vlog: Mark more static data const.
authorBen Pfaff <blp@nicira.com>
Fri, 26 Apr 2013 18:30:21 +0000 (11:30 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 3 May 2013 20:29:48 +0000 (13:29 -0700)
These data structures are never modified so this seems like a
logical change.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/vlog.c

index 8bc9938..275d02a 100644 (file)
@@ -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;