****************************************************************************/
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)) {
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;
}
case '<':
case '>':
case '"':
- if (p_last_component_contains_wcard) {
- *p_last_component_contains_wcard = True;
- }
+ *p_last_component_contains_wcard = True;
break;
default:
break;
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);
}
/****************************************************************************
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);
}
/****************************************************************************