1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

s3: smbd: dfs: Apply some README.Coding to parse_msdfs_symlink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2020-01-27 16:42:11 -08:00 committed by Ralph Boehme
parent 012b812188
commit a211c64087

View File

@ -538,17 +538,17 @@ bool parse_msdfs_symlink(TALLOC_CTX *ctx,
temp = talloc_strdup(ctx, target);
if (!temp) {
return False;
return false;
}
prot = strtok_r(temp, ":", &saveptr);
if (!prot) {
DEBUG(0,("parse_msdfs_symlink: invalid path !\n"));
return False;
return false;
}
alt_path = talloc_array(ctx, char *, MAX_REFERRAL_COUNT);
if (!alt_path) {
return False;
return false;
}
/* parse out the alternate paths */
@ -569,7 +569,7 @@ bool parse_msdfs_symlink(TALLOC_CTX *ctx,
struct referral, count);
if(reflist == NULL) {
TALLOC_FREE(alt_path);
return False;
return false;
}
} else {
reflist = *preflist = NULL;
@ -592,19 +592,19 @@ bool parse_msdfs_symlink(TALLOC_CTX *ctx,
"\\%s",
p);
if (!reflist[i].alternate_path) {
return False;
return false;
}
reflist[i].proximity = 0;
reflist[i].ttl = REFERRAL_TTL;
DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n",
reflist[i].alternate_path));
DBG_DEBUG("Created alt path: %s\n",
reflist[i].alternate_path);
}
*refcount = count;
TALLOC_FREE(alt_path);
return True;
return true;
}
/**********************************************************************