]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mount.cifs: have uppercase_string return success on NULL pointer
authorJeff Layton <jlayton@redhat.com>
Thu, 9 Oct 2008 14:42:28 +0000 (10:42 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 9 Oct 2008 14:42:28 +0000 (10:42 -0400)
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 <jlayton@redhat.com>
source/client/mount.cifs.c

index 56778dd4683a927f22a5883a3cef863588c35e9f..bdad5ba32d78fc0c6355b3cd8d41ef7a076e68ff 100644 (file)
@@ -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 */