diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-09-16 22:17:55 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-09-16 22:17:55 +0300 |
commit | c3df816585c6b8953fd4075cff894ec2d9ce0596 (patch) | |
tree | ebb52573baa3985720a2fd35e40bde8894406ab7 /lib-src | |
parent | 5490ccc5ebf39759dfd084bbd31f464701a3e775 (diff) | |
download | emacs-c3df816585c6b8953fd4075cff894ec2d9ce0596.tar.gz |
Fix compilation warning in etags.c
* lib-src/etags.c (etags_mktmp) [DOS_NT]: Don't dereference a NULL
pointer. Reported by Richard Copley <rcopley@gmail.com>.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 16 |
1 files changed, 9 insertions, 7 deletions
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; |