diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-19 11:40:44 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-19 12:02:23 -0500 |
commit | 558041d8d21b48287224dd0e32cf19563c77607c (patch) | |
tree | 39355af5b2d79d26efd5db4f9a4382611db72d24 /fs/filesystems.c | |
parent | c7b6c5fe67d1519759de2014a2c44f50fb1426f3 (diff) |
find_filesystem(): simplify comparison
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/filesystems.c')
-rw-r--r-- | fs/filesystems.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/filesystems.c b/fs/filesystems.c index 5797d45a78cb..c5618db110be 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c | |||
@@ -46,9 +46,9 @@ void put_filesystem(struct file_system_type *fs) | |||
46 | static struct file_system_type **find_filesystem(const char *name, unsigned len) | 46 | static struct file_system_type **find_filesystem(const char *name, unsigned len) |
47 | { | 47 | { |
48 | struct file_system_type **p; | 48 | struct file_system_type **p; |
49 | for (p=&file_systems; *p; p=&(*p)->next) | 49 | for (p = &file_systems; *p; p = &(*p)->next) |
50 | if (strlen((*p)->name) == len && | 50 | if (strncmp((*p)->name, name, len) == 0 && |
51 | strncmp((*p)->name, name, len) == 0) | 51 | !(*p)->name[len]) |
52 | break; | 52 | break; |
53 | return p; | 53 | return p; |
54 | } | 54 | } |