diff options
author | Jeremy Allison <jra@samba.org> | 2020-04-24 13:55:49 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-04-24 23:21:16 +0000 |
commit | e7dfe87ac64f5867e587e9f252cf0d6f41f01c63 (patch) | |
tree | ffc665f521a37463d79c4d36e5d310c72d60e14c /source3/smbd/filename.c | |
parent | 90713cbd6323f1844c1e405460436226a47e0daf (diff) | |
download | samba-e7dfe87ac64f5867e587e9f252cf0d6f41f01c63.tar.gz |
smbd: unix_convert_step(). Fix use of state->end as a boolean, always compare with NULL.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr 24 23:21:16 UTC 2020 on sn-devel-184
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 03c6a4b0a16..f45a45c8c7f 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -800,7 +800,7 @@ static NTSTATUS unix_convert_step(struct uc_state *state) /* * Chop the name at this point. */ - if (state->end) { + if (state->end != NULL) { *state->end = 0; } @@ -809,7 +809,7 @@ static NTSTATUS unix_convert_step(struct uc_state *state) /* The name cannot have a component of "." */ if (ISDOT(state->name)) { - if (!state->end) { + if (state->end == NULL) { /* Error code at the end of a pathname. */ return NT_STATUS_OBJECT_NAME_INVALID; } @@ -826,7 +826,7 @@ static NTSTATUS unix_convert_step(struct uc_state *state) } /* Wildcards never valid within a pathname. */ - if (state->name_has_wildcard && state->end) { + if (state->name_has_wildcard && state->end != NULL) { return NT_STATUS_OBJECT_NAME_INVALID; } @@ -876,7 +876,7 @@ static NTSTATUS unix_convert_step(struct uc_state *state) /* * Restore the / that we wiped out earlier. */ - if (state->end) { + if (state->end != NULL) { *state->end = '/'; } |