Use volatile sig_atomic_t for flag set in signal handler
authortb <tb@openbsd.org>
Sun, 18 Dec 2022 00:22:07 +0000 (00:22 +0000)
committertb <tb@openbsd.org>
Sun, 18 Dec 2022 00:22:07 +0000 (00:22 +0000)
regress/lib/libcrypto/bn/bn_shift.c

index f447f7b..5ba5f54 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: bn_shift.c,v 1.2 2022/12/17 22:30:39 tb Exp $ */
+/*     $OpenBSD: bn_shift.c,v 1.3 2022/12/18 00:22:07 tb Exp $ */
 /*
  * Copyright (c) 2022 Joel Sing <jsing@openbsd.org>
  *
@@ -468,7 +468,7 @@ struct benchmark benchmarks[] = {
 
 #define N_BENCHMARKS (sizeof(benchmarks) / sizeof(benchmarks[0]))
 
-static int benchmark_stop;
+static volatile sig_atomic_t benchmark_stop;
 
 static void
 benchmark_sig_alarm(int sig)