]> git.puffer.fish Git - matthieu/frr.git/commitdiff
make some structures constant.
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 3 Nov 2014 01:20:09 +0000 (01:20 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 01:16:33 +0000 (01:16 +0000)
These pre-initialized arrays are not modified.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 88d37b902bc8127379d3293b9671aa6a11479c23)

isisd/isis_pdu.c
ripd/rip_interface.c

index d1caaa49abe416cbeef2788c6d0fa6e25d64bf96..dad39bcda308b363f84e51308363d84269cb4b1a 100644 (file)
@@ -62,7 +62,7 @@
 #endif /* PNBBY */
 
 /* Utility mask array. */
-static u_char maskbit[] = {
+static const u_char maskbit[] = {
   0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff
 };
 
index c9cccbbe1f0505f66bb7149aca351e85e390d359..23d90a616d93b4198ab82b3d2411b06fa0ed27ed 100644 (file)
@@ -50,7 +50,7 @@ static int rip_enable_if_lookup (const char *ifname);
 static int rip_enable_network_lookup2 (struct connected *connected);
 static void rip_enable_apply_all (void);
 
-struct message ri_version_msg[] = 
+const struct message ri_version_msg[] =
 {
   {RI_RIP_VERSION_1,       "1"},
   {RI_RIP_VERSION_2,       "2"},