From: Karel Zak Date: Wed, 19 Jun 2024 09:54:40 +0000 (+0200) Subject: lslocks: remove unnecessary code X-Git-Tag: v2.42-start~295 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6850e89e5b0b35e7bfe90915e56bd598c25f0b10;p=thirdparty%2Futil-linux.git lslocks: remove unnecessary code Signed-off-by: Karel Zak --- diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c index 175ee3d2a..d0d05088c 100644 --- a/misc-utils/lslocks.c +++ b/misc-utils/lslocks.c @@ -384,10 +384,8 @@ static struct lock *get_lock(char *buf, struct override_info *oinfo, void *fallb l->pid = strtos32_or_err(tok, _("failed to parse pid")); if (l->pid > 0) { l->cmdname = pid_get_cmdname(l->pid); - if (!l->cmdname) { - l->cmdname = NULL; + if (!l->cmdname) cmdname_unknown = true; - } } else l->cmdname = NULL; }