On 03.02.2019 11:45, matthew green wrote: > Module Name: src > Committed By: mrg > Date: Sun Feb 3 10:45:58 UTC 2019 > > Modified Files: > src/games/backgammon/backgammon: main.c > src/tests/lib/libc/misc: t_ubsan.c > > Log Message: > - avoid multipling a boolean value, use &&. > >
> diff -u src/tests/lib/libc/misc/t_ubsan.c:1.1
> src/tests/lib/libc/misc/t_ubsan.c:1.2
> --- src/tests/lib/libc/misc/t_ubsan.c:1.1 Fri Aug 3 04:18:40 2018
> +++ src/tests/lib/libc/misc/t_ubsan.c Sun Feb 3 10:45:58 2019
> @@ -1,4 +1,4 @@
> -/* $NetBSD: t_ubsan.c,v 1.1 2018/08/03 04:18:40 kamil Exp $ */
> +/* $NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $ */
>
> /*-
> * Copyright (c) 2018 The NetBSD Foundation, Inc.
> @@ -29,7 +29,7 @@
> #include <sys/cdefs.h>
> __COPYRIGHT("@(#) Copyright (c) 2018\
> The NetBSD Foundation, inc. All rights reserved.");
> -__RCSID("$NetBSD: t_ubsan.c,v 1.1 2018/08/03 04:18:40 kamil Exp $");
> +__RCSID("$NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $");
>
> #include <sys/types.h>
> #include <sys/wait.h>
> @@ -376,7 +376,7 @@ test_mul_overflow_signed(void)
> volatile int a = INT_MAX;
> volatile int b = atoi("2");
>
> - raise((a * b) ? SIGSEGV : SIGBUS);
> + raise((a && b) ? SIGSEGV : SIGBUS);
> }
>
> UBSAN_TC_BODY(mul_overflow_signed, tc)
>
Multiplication was here on purpose to check UB report.
signature.asc
Description: OpenPGP digital signature
