s3-clitar: Improve readabilty of cmd_setmode().
authorAndreas Schneider <asn@samba.org>
Mon, 17 Feb 2014 09:50:17 +0000 (10:50 +0100)
committerAndreas Schneider <asn@samba.org>
Wed, 19 Feb 2014 17:22:30 +0000 (18:22 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/client/clitar.c

index 3d7f8ef55e2b543aafc42a4b3fded6171a982077..ad66b9916e023ccbaddad1d28b828458ae5d95ae 100644 (file)
@@ -394,9 +394,11 @@ int cmd_setmode(void)
     int mode = ATTR_SET;
     TALLOC_CTX *ctx = PANIC_IF_NULL(talloc_new(NULL));
     int err = 0;
+    bool ok;
 
 
-    if (!next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) {
+    ok = next_token_talloc(ctx, &cmd_ptr, &buf, NULL);
+    if (!ok) {
         DBG(0, ("setmode <filename> <[+|-]rsha>\n"));
         err = 1;
         goto out;
@@ -406,7 +408,7 @@ int cmd_setmode(void)
                                           "%s%s",
                                           client_get_cur_dir(),
                                           buf));
-    if (!fname) {
+    if (fname == NULL) {
         err = 1;
         goto out;
     }