From 76c4083741bf8498db4ccc0d6c0f43055a65eefc Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 18 Apr 2016 06:02:26 +0000 Subject: [PATCH] Use NULL for pointers. strrchr(3) will return NULL if the character does not appears in the string. MFC after: 2 weeks. --- usr.bin/rpcgen/rpc_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 64a29adc94f2..32e47a07e6f9 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -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, '.');