From 034da62e6bfa006974aac345d5140344c136a2d5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Feb 2014 10:50:17 +0100 Subject: [PATCH] s3-clitar: Improve readabilty of cmd_setmode(). Signed-off-by: Andreas Schneider Reviewed-by: David Disseldorp --- source3/client/clitar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 3d7f8ef55e2..ad66b9916e0 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -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 <[+|-]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; } -- 2.11.4.GIT