summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-02 18:40:32 +0000
committerOle Tr�an <otroan@employees.org>2023-11-03 09:26:47 +0000
commit6bd6c80f27c708f72aef1d850e48deaef832477e (patch)
treeb1aa3c39f4b25e83d28f213e719d3963242fdb8d /src/vppinfra
parent8800f732f868bf54da8adba05e38bd2477895ca5 (diff)
dev: strip debig log function name prefix during compilation
Type: improvement Change-Id: I9b9bb37a0895366b412f042b0e2da5bbdd477325 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vppinfra/string.h b/src/vppinfra/string.h
index 38d3baba9da..b1ef0e4809b 100644
--- a/src/vppinfra/string.h
+++ b/src/vppinfra/string.h
@@ -1161,6 +1161,13 @@ strstr_s_inline (char *s1, rsize_t s1max, const char *s2, rsize_t s2max,
return EOK;
}
+static_always_inline const char *
+clib_string_skip_prefix (const char *s, const char *prefix)
+{
+ uword len = __builtin_strlen (prefix);
+ return s + (__builtin_strncmp (s, prefix, len) ? 0 : len);
+}
+
#endif /* included_clib_string_h */
/*