diff options
author | Karel Zak <kzak@redhat.com> | 2016-03-29 15:44:48 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2016-03-29 15:44:48 +0200 |
commit | 935f9d5b35f189dac77b3496245958235c3e9f2c (patch) | |
tree | ecdaa3edab5a97a1d23017d44e1a41a1ad61772c | |
parent | c6121fec26dc7b423afeeb4694399862ddf23431 (diff) | |
download | util-linux-935f9d5b35f189dac77b3496245958235c3e9f2c.tar.gz |
libmount: result of operation is garbage or undefined [clang analyze]
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | libmount/src/monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c index 9f9e2ba81..a4b2e018c 100644 --- a/libmount/src/monitor.c +++ b/libmount/src/monitor.c @@ -313,7 +313,7 @@ static int userspace_event_verify(struct libmnt_monitor *mn, DBG(MONITOR, ul_debugobj(mn, "drain and verify userspace monitor inotify")); - /* the 'fd' is non-blocking */ + /* the me->fd is non-blocking */ do { ssize_t len; char *p; @@ -326,7 +326,7 @@ static int userspace_event_verify(struct libmnt_monitor *mn, for (p = buf; p < buf + len; p += sizeof(struct inotify_event) + e->len) { - int fd; + int fd = -1; e = (const struct inotify_event *) p; DBG(MONITOR, ul_debugobj(mn, " inotify event 0x%x [%s]\n", e->mask, e->len ? e->name : "")); |