Module Name: src
Committed By: christos
Date: Wed Mar 16 19:02:26 UTC 2016
Modified Files:
src/bin/sh: syntax.h
Log Message:
parenthesize for safety.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/bin/sh/syntax.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/syntax.h
diff -u src/bin/sh/syntax.h:1.5 src/bin/sh/syntax.h:1.6
--- src/bin/sh/syntax.h:1.5 Wed Mar 16 13:01:39 2016
+++ src/bin/sh/syntax.h Wed Mar 16 15:02:26 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: syntax.h,v 1.5 2016/03/16 17:01:39 christos Exp $ */
+/* $NetBSD: syntax.h,v 1.6 2016/03/16 19:02:26 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -68,7 +68,7 @@
/* These defines assume that the digits are contiguous (which is guaranteed) */
#define is_digit(c) ((unsigned)((c) - '0') <= 9)
-#define sh_ctype(c) (is_type+SYNBASE)[(int)c]
+#define sh_ctype(c) (is_type+SYNBASE)[(int)(c)]
#define is_alpha(c) (sh_ctype(c) & (ISUPPER|ISLOWER))
#define is_name(c) (sh_ctype(c) & (ISUPPER|ISLOWER|ISUNDER))
#define is_in_name(c) (sh_ctype(c) & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))