diff options
| author | kamil <kamil@NetBSD.org> | 2019-02-20 11:40:41 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2019-02-20 11:40:41 +0000 |
| commit | 19086dbdb150353474e39bbf6959b4291cc271e3 (patch) | |
| tree | 420215709b4290128661dbe76d5f0d7d0c030f33 /tests/lib/libc/misc | |
| parent | 319d49d822f46f2ed7bf7b079f3b26a38fe44f06 (diff) | |
Unify the style of t_ubsan tests
Apply similar change for load_invalid_value_bool in
test_load_invalid_value_enum.
Follow up of PR bin/53968 by Michael van Elst
Diffstat (limited to 'tests/lib/libc/misc')
| -rw-r--r-- | tests/lib/libc/misc/t_ubsan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/libc/misc/t_ubsan.c b/tests/lib/libc/misc/t_ubsan.c index d2eb23b62e0..ab627abd8c8 100644 --- a/tests/lib/libc/misc/t_ubsan.c +++ b/tests/lib/libc/misc/t_ubsan.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ubsan.c,v 1.4 2019/02/20 09:50:09 kamil Exp $ */ +/* $NetBSD: t_ubsan.c,v 1.5 2019/02/20 11:40:41 kamil 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.4 2019/02/20 09:50:09 kamil Exp $"); +__RCSID("$NetBSD: t_ubsan.c,v 1.5 2019/02/20 11:40:41 kamil Exp $"); #include <sys/types.h> #include <sys/wait.h> @@ -318,7 +318,7 @@ static void test_load_invalid_value_enum(void) { enum e { e1, e2, e3, e4 }; - volatile int a = atoi("10"); + volatile int a = INT_MAX - atoi("10"); volatile enum e E = *(REINTERPRET_CAST(volatile enum e*, &a)); raise((E == e1) ? SIGSEGV : SIGBUS); |
