Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the string. MFC after: 2 weeks.
This commit is contained in:
@@ -1331,7 +1331,7 @@ getdev(const char *name)
|
||||
return (name);
|
||||
|
||||
cp = strrchr(name, '/');
|
||||
if (cp == 0) {
|
||||
if (cp == NULL) {
|
||||
snprintf(device, sizeof(device), "%s%s", _PATH_DEV, name);
|
||||
if (is_dev(device))
|
||||
return (device);
|
||||
|
||||
Reference in New Issue
Block a user