diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-15 22:22:38 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-21 12:15:39 +0100 |
commit | 5a1606269aeeeb1b777974d88c33df543d1b6f4d (patch) | |
tree | a86e92477f702d426bcf00c2f299692addc444b1 | |
parent | 91ccaa87da9a5f8148636b0771fe1c67317187d3 (diff) | |
download | samba-5a1606269aeeeb1b777974d88c33df543d1b6f4d.tar.gz samba-5a1606269aeeeb1b777974d88c33df543d1b6f4d.tar.bz2 samba-5a1606269aeeeb1b777974d88c33df543d1b6f4d.zip |
s3: Tune if-conditions in a very hot codepath
This looks innocent, but it is visible in a netbench run. Due to boolean
short-circuiting we don't have to execute the conditions on the right-hand side
of the &&. So putting the less likely condition left gains a bit.
-rw-r--r-- | source3/smbd/reply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ae88db7562..682f56ff33 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -67,7 +67,7 @@ static NTSTATUS check_path_syntax_internal(char *path, } } - if (!posix_path && !stream_started && *s == ':') { + if ((*s == ':') && !posix_path && !stream_started) { if (*p_last_component_contains_wcard) { return NT_STATUS_OBJECT_NAME_INVALID; } |