From: Jeff Layton Date: Thu, 9 Oct 2008 14:42:28 +0000 (-0400) Subject: mount.cifs: have uppercase_string return success on NULL pointer X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34b5cfe8a0cb8674da0c5ac7d81b6e64160ccaa2;p=thirdparty%2Fsamba.git mount.cifs: have uppercase_string return success on NULL pointer We currently don't attempt to uppercase the device portion of the mount string if there isn't a prefixpath. Fix that by making uppercase_string return success without doing anything on a NULL pointer. Signed-off-by: Jeff Layton --- diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index 56778dd4683..bdad5ba32d7 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -992,12 +992,12 @@ static struct option longopts[] = { }; /* convert a string to uppercase. return false if the string - * wasn't ASCII or was a NULL ptr */ + * wasn't ASCII. Return success on a NULL ptr */ static int uppercase_string(char *string) { if (!string) - return 0; + return 1; while (*string) { /* check for unicode */