summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/error.h
diff options
context:
space:
mode:
authorSergey Nikiforov <void234@gmail.com>2023-01-14 00:12:05 +0500
committerDave Barach <vpp@barachs.net>2023-01-14 12:12:25 +0000
commite5465324dd11f8e9da33cf760e6166fdfe2e4304 (patch)
treed21ba7279c18360833193a249667c97b8a11fab9 /src/vppinfra/error.h
parent1d84abc93ed0f41ee7ced184e57ab9b6241c6eba (diff)
vppinfra: add const to char* params of several funcs
These functions do not need modifiable strings. It helps with linker sections as well as C++ compatibility. It is a good style to use const where approriate. Type: refactor Signed-off-by: void234@gmail.com Change-Id: I8d1e922197b3594122296e8c1af57e0a8ec0bf3d
Diffstat (limited to 'src/vppinfra/error.h')
-rw-r--r--src/vppinfra/error.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vppinfra/error.h b/src/vppinfra/error.h
index e0e2d4726b2..9eae8ea6818 100644
--- a/src/vppinfra/error.h
+++ b/src/vppinfra/error.h
@@ -85,10 +85,9 @@ extern void *clib_error_free_vector (clib_error_t * errors);
#define clib_error_free(e) e = clib_error_free_vector(e)
-extern clib_error_t *_clib_error_return (clib_error_t * errors,
- any code,
- uword flags,
- char *where, char *fmt, ...);
+extern clib_error_t *_clib_error_return (clib_error_t *errors, any code,
+ uword flags, const char *where,
+ const char *fmt, ...);
#define clib_error_return_code(e,code,flags,args...) \
_clib_error_return((e),(code),(flags),(char *)clib_error_function,args)