instead of doing a check for something which will never be true,
and then terminating, just terminate if it's not already
null-terminated.
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>
(cherry picked from commit
ceac74a6baad79155adaa692639b1d9f403525b6)
Change-Id: I14d3de25bca5b1ba1878048aac1973518f8c2359
Reviewed-on: http://gerrit.openafs.org/9583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
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);