Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh parenthesize for safety.
details: https://anonhg.NetBSD.org/src/rev/3818822af31b
branches: trunk
changeset: 344187:3818822af31b
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 16 19:02:26 2016 +0000
description:
parenthesize for safety.
diffstat:
bin/sh/syntax.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r e632c5c3ec8e -r 3818822af31b bin/sh/syntax.h
--- a/bin/sh/syntax.h Wed Mar 16 18:58:34 2016 +0000
+++ b/bin/sh/syntax.h Wed Mar 16 19:02:26 2016 +0000
@@ -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))
Home |
Main Index |
Thread Index |
Old Index