Use NULL for pointers.

strrchr(3) will return NULL if the character does not appears in
the string.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-18 06:02:26 +00:00
parent ef1cb629d8
commit 7dbab9554d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298183

View File

@ -451,7 +451,7 @@ generate_guard(const char *pathname)
char *guard, *tmp, *stopat;
filename = strrchr(pathname, '/'); /* find last component */
filename = ((filename == 0) ? pathname : filename+1);
filename = ((filename == NULL) ? pathname : filename+1);
guard = xstrdup(filename);
stopat = strrchr(guard, '.');