From 4b5f1d2cc30099ec7e055d0a4c455c2d905789fc Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 26 Apr 2013 11:30:21 -0700 Subject: [PATCH] vlog: Mark more static data const. These data structures are never modified so this seems like a logical change. Signed-off-by: Ben Pfaff --- lib/vlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vlog.c b/lib/vlog.c index 8bc993873..275d02acc 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -49,14 +49,14 @@ COVERAGE_DEFINE(vlog_recursive); #define ovs_assert use_assert_instead_of_ovs_assert_in_this_module /* Name for each logging level. */ -static const char *level_names[VLL_N_LEVELS] = { +static const char *const level_names[VLL_N_LEVELS] = { #define VLOG_LEVEL(NAME, SYSLOG_LEVEL) #NAME, VLOG_LEVELS #undef VLOG_LEVEL }; /* Syslog value for each logging level. */ -static int syslog_levels[VLL_N_LEVELS] = { +static const int syslog_levels[VLL_N_LEVELS] = { #define VLOG_LEVEL(NAME, SYSLOG_LEVEL) SYSLOG_LEVEL, VLOG_LEVELS #undef VLOG_LEVEL @@ -110,7 +110,7 @@ static void vlog_update_async_log_fd(void); /* Searches the 'n_names' in 'names'. Returns the index of a match for * 'target', or 'n_names' if no name matches. */ static size_t -search_name_array(const char *target, const char **names, size_t n_names) +search_name_array(const char *target, const char *const *names, size_t n_names) { size_t i; -- 2.47.0