r16251: for i in `seq 1 1000`
authorVolker Lendecke <vlendec@samba.org>
Thu, 15 Jun 2006 11:24:01 +0000 (11:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:28 +0000 (11:17 -0500)
do
echo "I will always compile before commit :-)"
done

Also fix Klokwork ID 806.

Volker

source/client/client.c
source/utils/net_usershare.c

index c1ff1151c0e1cd68c510141fd9f1ca48bd9efbc5..94fcaaca00d74269a37cff315faaee78113801c6 100644 (file)
@@ -1008,7 +1008,7 @@ static int cmd_mget(void)
 
        while (next_token_nr(NULL,p,NULL,sizeof(buf))) {
                pstrcpy(mget_mask,cur_dir);
-               if ((mask[0] != '\0') && (mget_mask[strlen(mget_mask)-1]!='\\'))
+               if ((mget_mask[0] != '\0') && (mget_mask[strlen(mget_mask)-1]!='\\'))
                        pstrcat(mget_mask,"\\");
                
                if (*p == '\\')
index 1ee156c4ee0b8aa5d0165c6708c7d0470ebb5623..ca9ca4e6e21dd9d3f7668c15653e69d6e25daf11 100644 (file)
@@ -129,7 +129,7 @@ int net_usershare_usage(int argc, const char **argv)
 static void get_basepath(pstring basepath)
 {
        pstrcpy(basepath, lp_usershare_path());
-       if (basepath[strlen(basepath)-1] == '/') {
+       if ((basepath[0] != '\0') && (basepath[strlen(basepath)-1] == '/')) {
                basepath[strlen(basepath)-1] = '\0';
        }
 }