]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (monitor) remove dead code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 15 Jan 2020 13:08:06 +0000 (14:08 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Jan 2020 13:08:06 +0000 (14:08 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/monitor.c

index 730c8bdea4e8c5d34b0305d4c82b321ddb6d3330..1f6eb1a572e4cffc4a978e869de4ee042ec9956b 100644 (file)
@@ -794,18 +794,15 @@ int mnt_monitor_next_change(struct libmnt_monitor *mn,
                        me = NULL;
        }
 
-       if (me) {
-               me->changed = 0;
+       me->changed = 0;
 
-               if (filename)
-                       *filename = me->path;
-               if (type)
-                       *type = me->type;
+       if (filename)
+               *filename = me->path;
+       if (type)
+               *type = me->type;
 
-               DBG(MONITOR, ul_debugobj(mn, " *** success [changed: %s]", me->path));
-       } else
-               return -EINVAL;
-       return 0;                               /* success */
+       DBG(MONITOR, ul_debugobj(mn, " *** success [changed: %s]", me->path));
+       return 0;
 }
 
 /**