]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: fix compiler warning [-Werror=maybe-uninitialized]
authorKarel Zak <kzak@redhat.com>
Mon, 6 Jun 2022 14:15:43 +0000 (16:15 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 6 Jun 2022 14:15:43 +0000 (16:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsfd.c

index a9be37588b4f9fea6fb0827dcb990769d6d91053..184e8d683287d6a2fcc8f28bfe0a4206294fe902 100644 (file)
@@ -1236,7 +1236,7 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc,
         */
        if (ctl->threads && leader == NULL) {
                DIR *sub = NULL;
-               pid_t tid;
+               pid_t tid = 0;
 
                while (procfs_process_next_tid(pc, &sub, &tid) == 0) {
                        if (tid == pid)