From 7b2db45f3cb5d596298f688844f92615a96fced7 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 29 Jan 2015 10:48:31 -0800 Subject: [PATCH] Add parentheses around ?: condition expression. * emacs.c (decode_env_path): Add parentheses around ternary operator condition to increase readability and pacify compiler warnings. --- src/ChangeLog | 5 +++++ src/emacs.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 36a3e8d..6286eea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Hans Wennborg + + * emacs.c (decode_env_path): Add parentheses around ternary operator + condition to increase readability and pacify compiler warnings. + 2015-01-29 Eli Zaretskii Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c. diff --git a/src/emacs.c b/src/emacs.c index fdd17d1..2282089 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2250,7 +2250,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty) p = strchr (path, SEPCHAR); if (!p) p = path + strlen (path); - element = (p - path ? make_unibyte_string (path, p - path) + element = ((p - path) ? make_unibyte_string (path, p - path) : empty_element); if (! NILP (element)) { -- 2.2.0.rc0.207.ga3a616c