summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-10-09 10:42:28 -0400
committerKarolin Seeger <kseeger@samba.org>2008-10-15 18:49:30 +0200
commit3f4cdabc965f824b70891f6a6bcb29e5f9b579e5 (patch)
tree73b94ff761c89ef4e971013661981a3777bc2592
parent15b2f1d8744d157b131a0441e8738d8519de37c7 (diff)
downloadsamba-3f4cdabc965f824b70891f6a6bcb29e5f9b579e5.tar.gz
samba-3f4cdabc965f824b70891f6a6bcb29e5f9b579e5.tar.xz
samba-3f4cdabc965f824b70891f6a6bcb29e5f9b579e5.zip
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 <jlayton@redhat.com> (cherry picked from commit 34b5cfe8a0cb8674da0c5ac7d81b6e64160ccaa2)
-rw-r--r--source/client/mount.cifs.c4
1 files changed, 2 insertions, 2 deletions
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 */