diff mbox series

[LEDE-DEV,mountd,1/2] mount: drop duplicated filesystem check from mount_add_list

Message ID 20171103090240.15899-2-zajec5@gmail.com
State Accepted
Delegated to: Rafał Miłecki
Headers show
Series mount: improve handling unsupported filesystems | expand

Commit Message

Rafał Miłecki Nov. 3, 2017, 9:02 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

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>
---
 mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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);