diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 7 |
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); } |