summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/error.c
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.c
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.c')
-rw-r--r--src/vppinfra/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vppinfra/error.c b/src/vppinfra/error.c
index b2b1a83e552..374b8b5256a 100644
--- a/src/vppinfra/error.c
+++ b/src/vppinfra/error.c
@@ -109,8 +109,8 @@ dispatch_message (u8 * msg)
}
__clib_export void
-_clib_error (int how_to_die,
- char *function_name, uword line_number, char *fmt, ...)
+_clib_error (int how_to_die, const char *function_name, uword line_number,
+ const char *fmt, ...)
{
u8 *msg = 0;
va_list va;
@@ -146,8 +146,8 @@ _clib_error (int how_to_die,
}
__clib_export clib_error_t *
-_clib_error_return (clib_error_t * errors,
- any code, uword flags, char *where, char *fmt, ...)
+_clib_error_return (clib_error_t *errors, any code, uword flags,
+ const char *where, const char *fmt, ...)
{
clib_error_t *e;
va_list va;