mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
afscp: null-terminate root.cell dir if needed in dynroot mode
instead of doing a check for something which will never be true, and then terminating, just terminate if it's not already null-terminated. Change-Id: I8ad18800de22c8d10eb27fbcb2fffb2b3a5a9127 Reviewed-on: http://gerrit.openafs.org/9439 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
parent
2998ab4535
commit
ceac74a6ba
@ -370,11 +370,8 @@ gettoproot(struct afscp_cell *cell, char *p, char **q,
|
||||
r = p;
|
||||
while (*r && *r != '/')
|
||||
r++;
|
||||
if (!*r && !*p) {
|
||||
afscp_errno = ENODEV;
|
||||
return 1;
|
||||
}
|
||||
*r++ = 0;
|
||||
if (*r)
|
||||
*r++ = 0;
|
||||
*q = r;
|
||||
afs_dprintf(("gettoproot: dynroot looking up cell %s\n", p));
|
||||
cell = afscp_CellByName(p, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user