]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: fix copy & past error [coverity scan]
authorKarel Zak <kzak@redhat.com>
Mon, 29 Nov 2021 12:46:17 +0000 (13:46 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Nov 2021 12:46:17 +0000 (13:46 +0100)
1235            if (right->type != NODE_NUM) {
1236                    snprintf(parser->errmsg, ERRMSG_LEN,
1237                             _("error: unexpected right operand type %s for: %s"),
>>>     CID 374358:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "left" in "left->type" looks like a copy-paste error.
1238                             NODE_CLASS(left)->name,
1239                             op2_class->name);
1240                    return false;
1241            }

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsfd-filter.c

index da53864778d1bdf49966505c5d713dbfe66afcb0..e89bb27917dbafbe1cafbd66947e587747e52e7d 100644 (file)
@@ -1238,7 +1238,7 @@ static bool op2_check_type_num(struct parser* parser, struct op2_class *op2_clas
        if (right->type != NODE_NUM) {
                snprintf(parser->errmsg, ERRMSG_LEN,
                         _("error: unexpected right operand type %s for: %s"),
-                        NODE_CLASS(left)->name,
+                        NODE_CLASS(right)->name,
                         op2_class->name);
                return false;
        }