summaryrefslogtreecommitdiff
path: root/usr.bin/dc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-02-11 20:44:32 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-02-11 20:44:32 +0000
commit4232511f5e5b1026b0b117574d5c919488479c92 (patch)
treef61e9746e771e93d3f057c6560ad82b35b9276b8 /usr.bin/dc
parente9dc4af9d88e15c08c08469321c15c0978067094 (diff)
Make flag set in signal handler volatile
Diffstat (limited to 'usr.bin/dc')
-rw-r--r--usr.bin/dc/bcode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 014ae6cfe83..2a394c66a86 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcode.c,v 1.21 2004/01/20 21:41:20 deraadt Exp $ */
+/* $OpenBSD: bcode.c,v 1.22 2004/02/11 20:44:31 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: bcode.c,v 1.21 2004/01/20 21:41:20 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: bcode.c,v 1.22 2004/02/11 20:44:31 otto Exp $";
#endif /* not lint */
#include <ssl/ssl.h>
@@ -50,7 +50,7 @@ struct bmachine {
bool extended_regs;
size_t reg_array_size;
struct stack *reg;
- bool interrupted;
+ volatile bool interrupted;
struct source readstack[RECURSION_STACK_SIZE];
};
@@ -1704,9 +1704,8 @@ eval(void)
src_free();
bmachine.readsp--;
continue;
- } else {
+ } else
bmachine.interrupted = false;
- }
}
#ifdef DEBUGGING
fprintf(stderr, "# %c\n", ch);