From: Chuck Lever Date: Wed, 23 Dec 2009 16:18:17 +0000 (-0500) Subject: libexport.a: fix a long-standing typo in name_cmp() X-Git-Tag: nfs-utils-1-2-2-rc4~3 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e6ec4637a0c9b42132dcbde73ad4506666b92975;p=nfs-utils.git libexport.a: fix a long-standing typo in name_cmp() Not sure what "(!*a || !a == ',')" means... but just a few lines later is "(!*a || *a == ',')". I think "a is '\0' or ','" is what was intended. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/support/export/client.c b/support/export/client.c index 5fcf355..6236561 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -297,7 +297,7 @@ name_cmp(char *a, char *b) /* compare strings a and b, but only upto ',' in a */ while (*a && *b && *a != ',' && *a == *b) a++, b++; - if (!*b && (!*a || !a == ',') ) + if (!*b && (!*a || *a == ',')) return 0; if (!*b) return 1; if (!*a || *a == ',') return -1;