From: Anton Moryakov <ant.v.moryakov@gmail.com>
To: netdev@vger.kernel.org
Cc: Anton Moryakov <ant.v.moryakov@gmail.com>
Subject: [PATCH] ip: remove duplicate condition in ila_csum_name2mode in
Date: Sun, 16 Feb 2025 04:31:55 +0300 [thread overview]
Message-ID: <20250216013155.643127-1-ant.v.moryakov@gmail.com> (raw)
Static analyzer reported:
expression is identical to previous conditio
Corrections explained:
The condition checking for "neutral-map-auto" was duplicated in the
ila_csum_name2mode function. This commit removes the redundant check
to improve code readability and maintainability.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
---
ip/ila_common.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/ip/ila_common.h b/ip/ila_common.h
index f99c2672..cd3524d5 100644
--- a/ip/ila_common.h
+++ b/ip/ila_common.h
@@ -31,8 +31,6 @@ static inline int ila_csum_name2mode(char *name)
return ILA_CSUM_NEUTRAL_MAP_AUTO;
else if (strcmp(name, "no-action") == 0)
return ILA_CSUM_NO_ACTION;
- else if (strcmp(name, "neutral-map-auto") == 0)
- return ILA_CSUM_NEUTRAL_MAP_AUTO;
else
return -1;
}
--
2.30.2
reply other threads:[~2025-02-16 1:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250216013155.643127-1-ant.v.moryakov@gmail.com \
--to=ant.v.moryakov@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.