From: Eli Zaretskii Date: Sat, 16 Sep 2017 19:17:55 +0000 (+0300) Subject: Fix compilation warning in etags.c X-Git-Tag: emacs-26.0.90~159 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3df816585;p=emacs.git Fix compilation warning in etags.c * lib-src/etags.c (etags_mktmp) [DOS_NT]: Don't dereference a NULL pointer. Reported by Richard Copley . --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 4000f47a414..009cba528d7 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -7068,14 +7068,16 @@ etags_mktmp (void) errno = temp_errno; templt = NULL; } - #if defined (DOS_NT) - /* The file name will be used in shell redirection, so it needs to have - DOS-style backslashes, or else the Windows shell will barf. */ - char *p; - for (p = templt; *p; p++) - if (*p == '/') - *p = '\\'; + else + { + /* The file name will be used in shell redirection, so it needs to have + DOS-style backslashes, or else the Windows shell will barf. */ + char *p; + for (p = templt; *p; p++) + if (*p == '/') + *p = '\\'; + } #endif return templt;