[quagga-dev,15520,4/4] *: snmp: add a load of "static" specifiers

Message ID 1465831755-405068-5-git-send-email-equinox@opensourcerouting.org
State Under Review
Headers show
Series
  • [quagga-dev,15517,1/4] lib: linklist: add listnode_add_before()
Related show

Commit Message

David Lamparter June 13, 2016, 3:29 p.m.
Make it easier to see which bits in *_snmp.c are actually referenced
from non-SNMP parts of the code.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
---
 bgpd/bgp_snmp.c     |  8 ++++----
 ospf6d/ospf6_snmp.c |  6 +++---
 ospfd/ospf_snmp.c   | 18 +++++++++---------
 ripd/rip_snmp.c     |  6 +++---
 zebra/zebra_snmp.c  |  4 ++--
 5 files changed, 21 insertions(+), 21 deletions(-)

Comments

cisystem@netdef.org June 13, 2016, 5 p.m. | #1
Continous Integration Result: FAILED

See below for issues.
This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 1975: http://patchwork.quagga.net/patch/1975
       [quagga-dev,15517,1/4] lib: linklist: add listnode_add_before()
  Patchwork 1972: http://patchwork.quagga.net/patch/1972
       [quagga-dev,15518,2/4] lib: add thread_add_timer_tv (struct timeval)
  Patchwork 1974: http://patchwork.quagga.net/patch/1974
       [quagga-dev,15519,3/4] lib: AgentX: use threads instead of eventloop hack
  Patchwork 1973: http://patchwork.quagga.net/patch/1973
       [quagga-dev,15520,4/4] *: snmp: add a load of &quot;static&quot; specifiers
Tested on top of Git : 5f67888 (as of 20160429.234845 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-309/


Get source and apply patch from patchwork: Failed
----------------
> Applying Patchwork patch 1975
> ------------------------------------
> Git Patch: Using "git apply" for patch 1975
> Applying Patchwork patch 1972
> ------------------------------------
> Git Patch: Using "git apply" for patch 1972
> Applying Patchwork patch 1974
> ------------------------------------
> Git Patch: Using "git apply" for patch 1974
> error: patch failed: lib/thread.c:35
> error: lib/thread.c: patch does not apply

Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org

Patch hide | download patch | download mbox

diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index c4490bf..430d922 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -117,8 +117,8 @@  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 SNMP_LOCAL_VARIABLES
 
 /* BGP-MIB instances. */
-oid bgp_oid [] = { BGP4MIB };
-oid bgp_trap_oid [] = { BGP4MIB, 0 };
+static oid bgp_oid [] = { BGP4MIB };
+static oid bgp_trap_oid [] = { BGP4MIB, 0 };
 
 /* IP address 0.0.0.0. */
 static struct in_addr bgp_empty_addr = { .s_addr = 0 };
@@ -138,7 +138,7 @@  static u_char *bgp4PathAttrTable (struct variable *, oid [], size_t *,
 				  int, size_t *, WriteMethod **);
 /* static u_char *bgpTraps (); */
 
-struct variable bgp_variables[] = 
+static struct variable bgp_variables[] = 
 {
   /* BGP version. */
   {BGPVERSION,                OCTET_STRING, RONLY, bgpVersion,
@@ -830,7 +830,7 @@  bgp4PathAttrTable (struct variable *v, oid name[], size_t *length,
 }
 
 /* BGP Traps. */
-struct trap_object bgpTrapList[] =
+static struct trap_object bgpTrapList[] =
 {
   {3, {3, 1, BGPPEERLASTERROR}},
   {3, {3, 1, BGPPEERSTATE}}
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 266031e..b634435 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -205,8 +205,8 @@ 
 SNMP_LOCAL_VARIABLES
 
 /* OSPFv3-MIB instances. */
-oid ospfv3_oid [] = { OSPFv3MIB };
-oid ospfv3_trap_oid [] = { OSPFv3MIB, 0 };
+static oid ospfv3_oid [] = { OSPFv3MIB };
+static oid ospfv3_trap_oid [] = { OSPFv3MIB, 0 };
 
 /* Hook functions. */
 static u_char *ospfv3GeneralGroup (struct variable *, oid *, size_t *,
@@ -220,7 +220,7 @@  static u_char *ospfv3NbrEntry (struct variable *, oid *, size_t *,
 static u_char *ospfv3IfEntry (struct variable *, oid *, size_t *,
 			      int, size_t *, WriteMethod **);
 
-struct variable ospfv3_variables[] =
+static struct variable ospfv3_variables[] =
 {
   /* OSPF general variables */
   {OSPFv3ROUTERID,             UNSIGNED,   RWRITE, ospfv3GeneralGroup,
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 1f9b851..676756d 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -209,8 +209,8 @@ 
 SNMP_LOCAL_VARIABLES
 
 /* OSPF-MIB instances. */
-oid ospf_oid [] = { OSPF2MIB };
-oid ospf_trap_oid [] = { OSPF2MIB, 16, 2 }; /* Not reverse mappable! */
+static oid ospf_oid [] = { OSPF2MIB };
+static oid ospf_trap_oid [] = { OSPF2MIB, 16, 2 }; /* Not reverse mappable! */
 
 /* IP address 0.0.0.0. */
 static struct in_addr ospf_empty_addr = { .s_addr = 0 };
@@ -243,7 +243,7 @@  static u_char *ospfExtLsdbEntry (struct variable *, oid *, size_t *, int,
 static u_char *ospfAreaAggregateEntry (struct variable *, oid *, size_t *,
 				       int, size_t *, WriteMethod **);
 
-struct variable ospf_variables[] = 
+static struct variable ospf_variables[] =
 {
   /* OSPF general variables */
   {OSPFROUTERID,              IPADDRESS, RWRITE, ospfGeneralGroup,
@@ -1408,7 +1408,7 @@  ospfHostEntry (struct variable *v, oid *name, size_t *length, int exact,
   return NULL;
 }
 
-struct list *ospf_snmp_iflist;
+static struct list *ospf_snmp_iflist;
 
 struct ospf_snmp_if
 {
@@ -1912,7 +1912,7 @@  ospfIfMetricEntry (struct variable *v, oid *name, size_t *length, int exact,
   return NULL;
 }
 
-struct route_table *ospf_snmp_vl_table;
+static struct route_table *ospf_snmp_vl_table;
 
 void
 ospf_snmp_vl_add (struct ospf_vl_data *vl_data)
@@ -2618,7 +2618,7 @@  ospfAreaAggregateEntry (struct variable *v, oid *name, size_t *length,
 #define NBRSTATECHANGE      2
 #define VIRTNBRSTATECHANGE  3
 
-struct trap_object ospfNbrTrapList[] =
+static struct trap_object ospfNbrTrapList[] =
 {
   {-2, {1, OSPFROUTERID}},
   {3, {10, 1, OSPFNBRIPADDR}},
@@ -2627,7 +2627,7 @@  struct trap_object ospfNbrTrapList[] =
 };
 
 
-struct trap_object ospfVirtNbrTrapList[] =
+static struct trap_object ospfVirtNbrTrapList[] =
 {
   {-2, {1, 1}},
   {3, {11, 1, OSPFVIRTNBRAREA}},
@@ -2635,7 +2635,7 @@  struct trap_object ospfVirtNbrTrapList[] =
   {3, {11, 1, OSPFVIRTNBRSTATE}}
 };
 
-struct trap_object ospfIfTrapList[] =
+static struct trap_object ospfIfTrapList[] =
 {
   {-2, {1, OSPFROUTERID}},
   {3, {7, 1, OSPFIFIPADDRESS}},
@@ -2643,7 +2643,7 @@  struct trap_object ospfIfTrapList[] =
   {3, {7, 1, OSPFIFSTATE}}
 };
 
-struct trap_object ospfVirtIfTrapList[] =
+static struct trap_object ospfVirtIfTrapList[] =
 {
   {-2, {1, OSPFROUTERID}},
   {3, {9, 1, OSPFVIRTIFAREAID}},
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 2c7cd2c..a8d9139 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -81,10 +81,10 @@ 
 SNMP_LOCAL_VARIABLES
 
 /* RIP-MIB instances. */
-oid rip_oid [] = { RIPV2MIB };
+static oid rip_oid [] = { RIPV2MIB };
 
 /* Interface cache table sorted by interface's address. */
-struct route_table *rip_ifaddr_table;
+static struct route_table *rip_ifaddr_table;
 
 /* Hook functions. */
 static u_char *rip2Globals (struct variable *, oid [], size_t *,
@@ -96,7 +96,7 @@  static u_char *rip2IfConfAddress (struct variable *, oid [], size_t *,
 static u_char *rip2PeerTable (struct variable *, oid [], size_t *,
 			      int, size_t *, WriteMethod **);
 
-struct variable rip_variables[] = 
+static struct variable rip_variables[] =
 {
   /* RIP Global Counters. */
   {RIP2GLOBALROUTECHANGES,    COUNTER, RONLY, rip2Globals,
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 3d005aa..16b8a9d 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -86,7 +86,7 @@ 
 
 extern struct zebra_t zebrad;
 
-oid ipfw_oid [] = { IPFWMIB };
+static oid ipfw_oid [] = { IPFWMIB };
 
 /* Hook functions. */
 static u_char * ipFwNumber (struct variable *, oid [], size_t *,
@@ -98,7 +98,7 @@  static u_char * ipCidrNumber (struct variable *, oid [], size_t *,
 static u_char * ipCidrTable (struct variable *, oid [], size_t *,
 			     int, size_t *, WriteMethod **);
 
-struct variable zebra_variables[] = 
+static struct variable zebra_variables[] =
   {
     {0, GAUGE32, RONLY, ipFwNumber, 1, {1}},
     {IPFORWARDDEST, IPADDRESS, RONLY, ipFwTable, 3, {2, 1, 1}},