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:
Marcelo Araujo
2016-04-18 14:08:35 +00:00
parent c0e5e7f3d2
commit edf6b683e8
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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);