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>.
This commit is contained in:
parent
5490ccc5eb
commit
c3df816585
1 changed files with 9 additions and 7 deletions
|
@ -7068,14 +7068,16 @@ etags_mktmp (void)
|
||||||
errno = temp_errno;
|
errno = temp_errno;
|
||||||
templt = NULL;
|
templt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (DOS_NT)
|
#if defined (DOS_NT)
|
||||||
|
else
|
||||||
|
{
|
||||||
/* The file name will be used in shell redirection, so it needs to have
|
/* The file name will be used in shell redirection, so it needs to have
|
||||||
DOS-style backslashes, or else the Windows shell will barf. */
|
DOS-style backslashes, or else the Windows shell will barf. */
|
||||||
char *p;
|
char *p;
|
||||||
for (p = templt; *p; p++)
|
for (p = templt; *p; p++)
|
||||||
if (*p == '/')
|
if (*p == '/')
|
||||||
*p = '\\';
|
*p = '\\';
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return templt;
|
return templt;
|
||||||
|
|
Loading…
Add table
Reference in a new issue