diff options
author | Andreas Schneider <asn@samba.org> | 2014-02-17 11:25:43 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-02-19 18:22:30 +0100 |
commit | 4f6552c63ba0cc293463f38ed08cd30399fdad65 (patch) | |
tree | ff999cb7fc92f8d4278cb577494c9fd0876cf57a /source3/client | |
parent | 98ede411e3baeb4da8854450e002e4478c32ddd3 (diff) | |
download | samba-4f6552c63ba0cc293463f38ed08cd30399fdad65.tar.gz |
s3-clitar: Improve readabilty of make_remote_path().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 3e380cb8654..09dd4184a69 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1518,8 +1518,7 @@ static int make_remote_path(const char *full_path) len = talloc_get_size(path) - 1; last_backslash = strrchr_m(path, '\\'); - - if (!last_backslash) { + if (last_backslash == NULL) { goto out; } @@ -1528,7 +1527,7 @@ static int make_remote_path(const char *full_path) subpath[0] = 0; p = strtok_r(path, "\\", &state); - while (p) { + while (p != NULL) { strlcat(subpath, p, len); status = cli_chkpath(cli, subpath); if (!NT_STATUS_IS_OK(status)) { |