r14127: Remove coverity warning on mount.cifs.c
authorSteve French <sfrench@samba.org>
Fri, 10 Mar 2006 04:05:49 +0000 (04:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:11:13 +0000 (11:11 -0500)
(This used to be commit 2ec51635ae7ba448f18c4c1342a5fd2adb1ec869)

source3/client/mount.cifs.c

index 103e369f27e6d5e0664d45953180f8f3aec8047e..23a74d34fad2fe5398be2c93e621b5716db6a7fd 100755 (executable)
@@ -756,7 +756,7 @@ static char * parse_server(char ** punc_name)
 
        if(length < 3) {
                /* BB add code to find DFS root here */
-               printf("\nMounting the DFS root for domain not implemented yet");
+               printf("\nMounting the DFS root for domain not implemented yet\n");
                return NULL;
        } else {
                if(strncmp(unc_name,"//",2) && strncmp(unc_name,"\\\\",2)) {
@@ -887,7 +887,11 @@ int main(int argc, char ** argv)
 
        if(argc && argv) {
                thisprogram = argv[0];
+       } else {
+               mount_cifs_usage();
+               exit(1);
        }
+
        if(thisprogram == NULL)
                thisprogram = "mount.cifs";
 
@@ -1113,6 +1117,8 @@ mount_retry:
                optlen += strlen(share_name) + 4;
        else {
                printf("No server share name specified\n");
+               printf("\nMounting the DFS root for server not implemented yet\n");
+                exit(1);
        }
        if(user_name)
                optlen += strlen(user_name) + 6;