summaryrefslogtreecommitdiff
path: root/source3/client/clitar.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-02-17 11:10:11 +0100
committerAndreas Schneider <asn@samba.org>2014-02-19 18:22:30 +0100
commit2ccba45d301997042e9b3ba07bd157d02b7e7b94 (patch)
tree0cd2979785e234ff9d3d88ee4e7f34ed10ba8211 /source3/client/clitar.c
parentf955bc4b5de449a6c6ffcbefa807b207d754adf8 (diff)
downloadsamba-2ccba45d301997042e9b3ba07bd157d02b7e7b94.tar.gz
s3-clitar: Improve readabilty of tar_read_inclusion_file().
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 45b88ea102a..fa16c9b382c 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1235,15 +1235,18 @@ static int tar_read_inclusion_file (struct tar *t, const char* filename)
char *line;
TALLOC_CTX *ctx = PANIC_IF_NULL(talloc_new(NULL));
int err = 0;
- int fd = open(filename, O_RDONLY);
+ int fd;
+ fd = open(filename, O_RDONLY);
if (fd < 0) {
DBG(0, ("Can't open inclusion file '%s': %s\n", filename, strerror(errno)));
err = 1;
goto out;
}
- while ((line = afdgets(fd, ctx, 0))) {
+ for (line = afdgets(fd, ctx, 0);
+ line != NULL;
+ line = afdgets(fd, ctx, 0)) {
tar_add_selection_path(t, line);
}