mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
ef1cb629d8
commit
7dbab9554d
1 changed files with 1 additions and 1 deletions
|
|
@ -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, '.');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue