mount: drop duplicated filesystem check from mount_add_list
authorRafał Miłecki <rafal@milecki.pl>
Fri, 3 Nov 2017 09:02:39 +0000 (10:02 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 6 Nov 2017 09:37:05 +0000 (10:37 +0100)
At the very beginning of this function there is following code:
if(fs <= MBR || fs > LASTFS)
return;

There is no point in checking for the same range again as these checks
will always evaluate into true.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
mount.c

diff --git a/mount.c b/mount.c
index 92606da32d155fa7cca87a258b04bbe70b6ded8f..6d95de95d1d05aff2dc575e0a5f6d6077a0fcad1 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -155,7 +155,7 @@ static void mount_add_list(char *name, char *dev, char *serial,
        mount->mounted = 0;
        mount->fs = fs;
        list_add(&mount->list, &mounts);
-       if((!mount->ignore) && (mount->fs > MBR) && (mount->fs <= LASTFS))
+       if (!mount->ignore)
        {
                log_printf("new mount : %s -> %s (%s)\n", name, dev, fs_names[mount->fs]);
                snprintf(tmp, 64, "%s%s", uci_path, name);