Module Name:    src
Committed By:   apb
Date:           Tue Jul 14 21:15:48 UTC 2009

Modified Files:
        src/usr.bin/mail: lex.c

Log Message:
Declare "com" as volatile in execute(), to make it safe to use
across setjmp/longjmp.

Inspired by PR 41255 from Kurt Lidl, but this change makes "com" a
volatile pointer to const non-volatile data, whereas the PR made it a
non-volatile pointer to const volatile data.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/mail/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/mail/lex.c
diff -u src/usr.bin/mail/lex.c:1.37 src/usr.bin/mail/lex.c:1.38
--- src/usr.bin/mail/lex.c:1.37	Fri Apr 10 13:08:25 2009
+++ src/usr.bin/mail/lex.c	Tue Jul 14 21:15:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex.c,v 1.37 2009/04/10 13:08:25 christos Exp $	*/
+/*	$NetBSD: lex.c,v 1.38 2009/07/14 21:15:48 apb Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)lex.c	8.2 (Berkeley) 4/20/95";
 #else
-__RCSID("$NetBSD: lex.c,v 1.37 2009/04/10 13:08:25 christos Exp $");
+__RCSID("$NetBSD: lex.c,v 1.38 2009/07/14 21:15:48 apb Exp $");
 #endif
 #endif /* not lint */
 
@@ -585,7 +585,7 @@
 {
 	char *word;
 	char *arglist[MAXARGC];
-	const struct cmd *com = NULL;
+	const struct cmd * volatile com = NULL;
 	char *volatile cp;
 	int retval;
 	int c;

Reply via email to