From 10d88917af2fd8083ab57faca55004b19608147f Mon Sep 17 00:00:00 2001 From: Hector Cao Date: Thu, 28 May 2026 09:13:51 +0200 Subject: [PATCH] preserve const-ness when calling strrchr() strrchr() preserves the const-ness of the argument, the argument is a const char* so the return value should also be a const. --- src/dpdkstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dpdkstat.c b/src/dpdkstat.c index ae93e53b2..58abbe4e4 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -310,7 +310,7 @@ int dpdk_helper_command_handler(dpdk_helper_ctx_t *phc, enum DPDK_CMD cmd) { static void dpdk_stats_resolve_cnt_type(char *cnt_type, size_t cnt_type_len, const char *cnt_name) { - char *type_end; + const char *type_end; type_end = strrchr(cnt_name, '_'); if ((type_end != NULL) && (strncmp(cnt_name, "rx_", strlen("rx_")) == 0)) { -- 2.47.3