mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
find_filesystem(): simplify comparison
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c7b6c5fe67
commit
558041d8d2
@ -46,9 +46,9 @@ void put_filesystem(struct file_system_type *fs)
|
|||||||
static struct file_system_type **find_filesystem(const char *name, unsigned len)
|
static struct file_system_type **find_filesystem(const char *name, unsigned len)
|
||||||
{
|
{
|
||||||
struct file_system_type **p;
|
struct file_system_type **p;
|
||||||
for (p=&file_systems; *p; p=&(*p)->next)
|
for (p = &file_systems; *p; p = &(*p)->next)
|
||||||
if (strlen((*p)->name) == len &&
|
if (strncmp((*p)->name, name, len) == 0 &&
|
||||||
strncmp((*p)->name, name, len) == 0)
|
!(*p)->name[len])
|
||||||
break;
|
break;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user