summaryrefslogtreecommitdiffstats
path: root/source3/client/clitar.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-02-17 10:49:16 +0100
committerAndreas Schneider <asn@samba.org>2014-02-19 18:22:29 +0100
commit7bb9836c94e5659a2b9d6cca3becdd1dfc205932 (patch)
tree3d84f6f9078ea55ac1f73696f4ebd01c044f0bb6 /source3/client/clitar.c
parenta65f557c6b588b725d1e4900f1a0bf5772d9c892 (diff)
downloadsamba-7bb9836c94e5659a2b9d6cca3becdd1dfc205932.tar.gz
samba-7bb9836c94e5659a2b9d6cca3becdd1dfc205932.tar.xz
samba-7bb9836c94e5659a2b9d6cca3becdd1dfc205932.zip
s3-clitar: Improve readabilty of cmd_tar().
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r--source3/client/clitar.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 12a5e0d5cc2..3d7f8ef55e2 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -343,8 +343,11 @@ int cmd_tar(void)
int maxtok = max_token(cmd_ptr);
int i = 0;
int err = 0;
+ bool ok;
+ int rc;
- if (!next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) {
+ ok = next_token_talloc(ctx, &cmd_ptr, &buf, NULL);
+ if (!ok) {
DBG(0, ("tar <c|x>[IXFbganN] [options] <tar file> [path list]\n"));
err = 1;
goto out;
@@ -357,13 +360,15 @@ int cmd_tar(void)
val[i++] = buf;
}
- if (tar_parse_args(&tar_ctx, flag, val, i)) {
+ rc = tar_parse_args(&tar_ctx, flag, val, i);
+ if (rc != 0) {
DBG(0, ("parse_args failed\n"));
err = 1;
goto out;
}
- if (tar_process(&tar_ctx)) {
+ rc = tar_process(&tar_ctx);
+ if (rc != 0) {
DBG(0, ("tar_process failed\n"));
err = 1;
goto out;