From: Hans Wennborg Date: Thu, 29 Jan 2015 19:31:14 +0000 (+0200) Subject: Avoid compiler warnings in decode_env_path. X-Git-Tag: emacs-24.4.90~22 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=868df45;p=emacs.git Avoid compiler warnings in decode_env_path. src/emacs.c (decode_env_path): Add parentheses around ternary operator to increase readability and pacify compiler warnings. --- diff --git a/src/ChangeLog b/src/ChangeLog index 08779405acb..949ea741e1d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Hans Wennborg (tiny change) + + * emacs.c (decode_env_path): Add parentheses around ternary + operator to increase readability and pacify compiler warnings. + 2015-01-29 Eli Zaretskii * w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not diff --git a/src/emacs.c b/src/emacs.c index 0b7adbd0967..9b78a70428e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2300,7 +2300,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)) {