Fix Coverity ID 563
authorVolker Lendecke <vl@samba.org>
Sat, 15 Mar 2008 21:16:42 +0000 (22:16 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 15 Mar 2008 21:30:25 +0000 (22:30 +0100)
dirmask is always set here, we've dereferenced it before anyway

source/client/client.c

index b0b3e8e19b66f85f545b0df75ecd41b9ea160749..a285bccfe746ebd6b1bdbf3c3dcee6034b6cb9e6 100644 (file)
@@ -4102,11 +4102,7 @@ static void completion_remote_filter(const char *mnt,
                        TALLOC_CTX *ctx = talloc_stackframe();
                        char *tmp;
 
-                       if (info->dirmask && info->dirmask[0] != 0) {
-                               tmp = talloc_strdup(ctx,info->dirmask);
-                       } else {
-                               tmp = talloc_strdup(ctx,"");
-                       }
+                       tmp = talloc_strdup(ctx,info->dirmask);
                        if (!tmp) {
                                TALLOC_FREE(ctx);
                                return;