From 7a4b49bdd1ce453cb50a84167fb9f3e2f8e58630 Mon Sep 17 00:00:00 2001 From: Hiroki Shirokura Date: Wed, 19 Feb 2020 21:46:24 +0900 Subject: [PATCH] lib: refactor func prototype seg6local_context2str (step1) Make seg6local_context2str function's prototype better. This function is added on commit e496b4203, and function interface's considering wasn't enough. Signed-off-by: Hiroki Shirokura --- lib/srv6.c | 3 ++- lib/srv6.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/srv6.c b/lib/srv6.c index 287bf56089..9b9f402987 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -76,7 +76,8 @@ int snprintf_seg6_segs(char *str, } const char *seg6local_context2str(char *str, size_t size, - struct seg6local_context *ctx, uint32_t action) + const struct seg6local_context *ctx, + uint32_t action) { char b0[128]; diff --git a/lib/srv6.h b/lib/srv6.h index 24c7ffc3a2..b72b098c78 100644 --- a/lib/srv6.h +++ b/lib/srv6.h @@ -119,9 +119,9 @@ static inline void *sid_copy(struct in6_addr *dst, const char * seg6local_action2str(uint32_t action); -const char * -seg6local_context2str(char *str, size_t size, - struct seg6local_context *ctx, uint32_t action); +const char *seg6local_context2str(char *str, size_t size, + const struct seg6local_context *ctx, + uint32_t action); int snprintf_seg6_segs(char *str, size_t size, const struct seg6_segs *segs); -- 2.39.5