From: Al Viro Date: Tue, 19 Jan 2016 16:40:44 +0000 (-0500) Subject: find_filesystem(): simplify comparison X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=558041d8d21b48287224dd0e32cf19563c77607c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git find_filesystem(): simplify comparison Signed-off-by: Al Viro --- 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) static struct file_system_type **find_filesystem(const char *name, unsigned len) { struct file_system_type **p; - for (p=&file_systems; *p; p=&(*p)->next) - if (strlen((*p)->name) == len && - strncmp((*p)->name, name, len) == 0) + for (p = &file_systems; *p; p = &(*p)->next) + if (strncmp((*p)->name, name, len) == 0 && + !(*p)->name[len]) break; return p; }