mount: drop duplicated filesystem check from mount_add_list
[oweals/mountd.git] / mount.c
diff --git a/mount.c b/mount.c
index a7f1862f2747919090da85c2c4fcc140ae282463..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);
@@ -174,7 +174,6 @@ static int mount_check_disc(char *disc)
        if(!fp)
        {
                log_printf("error reading /proc/mounts");
-               fclose(fp);
                return avail;
        }
        while((fgets(tmp, 256, fp) != NULL) && (avail == -1))
@@ -615,7 +614,6 @@ static void mount_check_mount_list(void)
        if(!fp)
        {
                log_printf("error reading /proc/mounts");
-               fclose(fp);
                return;
        }
        mounted_count = 0;