Don't pass NULL to strcmp
authorMarc Dionne <marc.c.dionne@gmail.com>
Sun, 28 Feb 2010 16:08:11 +0000 (11:08 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sun, 28 Feb 2010 19:21:58 +0000 (11:21 -0800)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/bucoord/commands.c

index 1cfdcc7..a091ba1 100644 (file)
@@ -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;
                        }
                    }