* [PATCH] ip: remove duplicate condition in ila_csum_name2mode in
@ 2025-02-16 1:31 Anton Moryakov
0 siblings, 0 replies; only message in thread
From: Anton Moryakov @ 2025-02-16 1:31 UTC (permalink / raw)
To: netdev; +Cc: Anton Moryakov
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-16 1:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 1:31 [PATCH] ip: remove duplicate condition in ila_csum_name2mode in Anton Moryakov
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.