From: Marc Dionne Date: Sun, 28 Feb 2010 16:08:11 +0000 (-0500) Subject: Don't pass NULL to strcmp X-Git-Tag: openafs-devel-1_5_73~116 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=375fdd4f866398a9d931408d0c40e6e782e291e1;p=packages%2Fo%2Fopenafs.git Don't pass NULL to strcmp A recent gcc update gives me a series of warnings from the NULL argument to strcmp. We should be passing an empty string instead of a NULL pointer. I suspect this was unintentional from a search/replace operation in commit 8229e668. Change-Id: I9677d80d32e5bd54ca1b560788a430c8cf40dae9 Reviewed-on: http://gerrit.openafs.org/1489 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index 1cfdcc7a7..a091ba1d4 100644 --- a/src/bucoord/commands.c +++ b/src/bucoord/commands.c @@ -307,7 +307,7 @@ EvalVolumeSet2(struct bc_config *aconfig, if ((strcmp(&entries[e].name[l], ".backup") == 0) || (strcmp(&entries[e].name[l], ".readonly") == 0) - || (strcmp(&entries[e].name[l], NULL) == 0)) + || (strcmp(&entries[e].name[l], "") == 0)) add = 0; } }