From 75e7412d44da9886d7b8555395ea79c113aaa303 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 3 Nov 2017 10:02:39 +0100 Subject: [PATCH] mount: drop duplicated filesystem check from mount_add_list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: John Crispin --- mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount.c b/mount.c index 92606da..6d95de9 100644 --- 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); -- 2.25.1