mount.cifs: have uppercase_string return success on NULL pointer
authorJeff Layton <jlayton@redhat.com>
Thu, 9 Oct 2008 13:58:39 +0000 (09:58 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 9 Oct 2008 13:58:39 +0000 (09:58 -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>
source3/client/mount.cifs.c

index b7a76c61024abfd37651659e0ab34ec924b8d886..0c30216cd451bddf98d8bed57652b2bfccdb05e1 100644 (file)
@@ -996,12 +996,12 @@ static struct option longopts[] = {
 };
 
 /* convert a string to uppercase. return false if the string
 };
 
 /* 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)
 static int
 uppercase_string(char *string)
 {
        if (!string)
-               return 0;
+               return 1;
 
        while (*string) {
                /* check for unicode */
 
        while (*string) {
                /* check for unicode */