ufsread: Use appropriate UFS_MAXNAMLEN constant
A follow-up to r313475. Submitted by: Gaurav Gangalwar <Gaurav.Gangalwar at emc.com> Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
7c32df5d03
commit
ec4f9c7157
@ -121,7 +121,7 @@ fsfind(const char *name, ufs_ino_t * ino)
|
||||
static ufs_ino_t
|
||||
lookup(const char *path)
|
||||
{
|
||||
static char name[MAXNAMLEN + 1];
|
||||
static char name[UFS_MAXNAMLEN + 1];
|
||||
const char *s;
|
||||
ufs_ino_t ino;
|
||||
ssize_t n;
|
||||
@ -135,7 +135,7 @@ lookup(const char *path)
|
||||
if (!*path)
|
||||
break;
|
||||
for (s = path; *s && *s != '/'; s++);
|
||||
if ((n = s - path) > MAXNAMLEN)
|
||||
if ((n = s - path) > UFS_MAXNAMLEN)
|
||||
return 0;
|
||||
ls = *path == '?' && n == 1 && !*s;
|
||||
memcpy(name, path, n);
|
||||
|
Loading…
Reference in New Issue
Block a user