summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-13 20:26:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:07 -0500
commit165e08e8b1efa55b4548e1853a637e1696e4fd7b (patch)
tree2279daff1cf420475c0dede1ee8578219ec6fd9d /source3/smbd
parent209509f7caaafead23957351156972ce805cde76 (diff)
downloadsamba-165e08e8b1efa55b4548e1853a637e1696e4fd7b.tar.gz
samba-165e08e8b1efa55b4548e1853a637e1696e4fd7b.tar.bz2
samba-165e08e8b1efa55b4548e1853a637e1696e4fd7b.zip
r20740: Get rid of some if-statements
(This used to be commit db93c1b98d5445071ad0af229afed1f11ab0a862)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 21c8b13b5c..7d89382a7d 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -45,18 +45,16 @@ extern BOOL global_encrypted_passwords_negotiated;
****************************************************************************/
NTSTATUS check_path_syntax_internal(pstring destname,
- const pstring srcname,
- BOOL windows_path, BOOL
- *p_last_component_contains_wcard)
+ const pstring srcname,
+ BOOL windows_path,
+ BOOL *p_last_component_contains_wcard)
{
char *d = destname;
const char *s = srcname;
NTSTATUS ret = NT_STATUS_OK;
BOOL start_of_name_component = True;
- if (p_last_component_contains_wcard) {
- *p_last_component_contains_wcard = False;
- }
+ *p_last_component_contains_wcard = False;
while (*s) {
if (IS_DIRECTORY_SEP(*s)) {
@@ -74,9 +72,7 @@ NTSTATUS check_path_syntax_internal(pstring destname,
start_of_name_component = True;
/* New component. */
- if (p_last_component_contains_wcard) {
- *p_last_component_contains_wcard = False;
- }
+ *p_last_component_contains_wcard = False;
continue;
}
@@ -132,9 +128,7 @@ NTSTATUS check_path_syntax_internal(pstring destname,
case '<':
case '>':
case '"':
- if (p_last_component_contains_wcard) {
- *p_last_component_contains_wcard = True;
- }
+ *p_last_component_contains_wcard = True;
break;
default:
break;
@@ -181,7 +175,8 @@ NTSTATUS check_path_syntax_internal(pstring destname,
NTSTATUS check_path_syntax(pstring destname, const pstring srcname)
{
- return check_path_syntax_internal(destname, srcname, True, NULL);
+ BOOL ignore;
+ return check_path_syntax_internal(destname, srcname, True, &ignore);
}
/****************************************************************************
@@ -203,7 +198,8 @@ NTSTATUS check_path_syntax_wcard(pstring destname, const pstring srcname, BOOL *
static NTSTATUS check_path_syntax_posix(pstring destname, const pstring srcname)
{
- return check_path_syntax_internal(destname, srcname, False, NULL);
+ BOOL ignore;
+ return check_path_syntax_internal(destname, srcname, False, &ignore);
}
/****************************************************************************