aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-16 22:17:55 +0300
committerEli Zaretskii2017-09-16 22:17:55 +0300
commitc3df816585c6b8953fd4075cff894ec2d9ce0596 (patch)
treeebb52573baa3985720a2fd35e40bde8894406ab7 /lib-src
parent5490ccc5ebf39759dfd084bbd31f464701a3e775 (diff)
downloademacs-c3df816585c6b8953fd4075cff894ec2d9ce0596.tar.gz
emacs-c3df816585c6b8953fd4075cff894ec2d9ce0596.zip
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.c16
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)
7068 errno = temp_errno; 7068 errno = temp_errno;
7069 templt = NULL; 7069 templt = NULL;
7070 } 7070 }
7071
7072#if defined (DOS_NT) 7071#if defined (DOS_NT)
7073 /* The file name will be used in shell redirection, so it needs to have 7072 else
7074 DOS-style backslashes, or else the Windows shell will barf. */ 7073 {
7075 char *p; 7074 /* The file name will be used in shell redirection, so it needs to have
7076 for (p = templt; *p; p++) 7075 DOS-style backslashes, or else the Windows shell will barf. */
7077 if (*p == '/') 7076 char *p;
7078 *p = '\\'; 7077 for (p = templt; *p; p++)
7078 if (*p == '/')
7079 *p = '\\';
7080 }
7079#endif 7081#endif
7080 7082
7081 return templt; 7083 return templt;