]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[cleanup] functions taking no args should be declared with void args
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 9 Feb 2009 18:14:16 +0000 (10:14 -0800)
committerPaul Jakma <paul@quagga.net>
Fri, 12 Jun 2009 16:09:03 +0000 (17:09 +0100)
Use Ansi-C prototypes rather than old K&R method of declaring
function without arguments

15 files changed:
bgpd/bgp_advertise.c
bgpd/bgp_attr.c
bgpd/bgp_clist.c
bgpd/bgp_community.c
bgpd/bgp_ecommunity.c
bgpd/bgp_filter.c
bgpd/bgp_fsm.c
bgpd/bgp_nexthop.c
bgpd/bgp_route.c
bgpd/bgp_snmp.c
bgpd/bgp_table.c
bgpd/bgpd.c
lib/if.c
ospfd/ospf_snmp.c
zebra/rtadv.c

index b9f4a85b2f2de7a8736fbfca9bee038a5cc3af92..87eb7ac7825d6bd0a855c4c237eb445ae4c03fff 100644 (file)
@@ -40,7 +40,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    one packet.  To do that we maintain attribute hash in struct
    peer.  */
 static struct bgp_advertise_attr *
-baa_new ()
+baa_new (void)
 {
   return (struct bgp_advertise_attr *)
     XCALLOC (MTYPE_BGP_ADVERTISE_ATTR, sizeof (struct bgp_advertise_attr));
@@ -84,7 +84,7 @@ baa_hash_cmp (const void *p1, const void *p2)
    structure.  This structure is referred from BGP adjacency
    information.  */
 static struct bgp_advertise *
-bgp_advertise_new ()
+bgp_advertise_new (void)
 {
   return (struct bgp_advertise *) 
     XCALLOC (MTYPE_BGP_ADVERTISE, sizeof (struct bgp_advertise));
index 5839d3fe0e888e99759bbad076c6636f208d6d17..edacd5db0ea64594cb889331795cc9e8586e6677 100644 (file)
@@ -274,7 +274,7 @@ transit_hash_cmp (const void *p1, const void *p2)
 }
 
 static void
-transit_init ()
+transit_init (void)
 {
   transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp);
 }
index a8d8742f0c891cc50bdfcc33497fe582489e7a58..8d8c90c4a15637cba3f37807a1c9e537dfa40689 100644 (file)
@@ -49,7 +49,7 @@ community_list_master_lookup (struct community_list_handler *ch, int master)
 
 /* Allocate a new community list entry.  */
 static struct community_entry *
-community_entry_new ()
+community_entry_new (void)
 {
   return XCALLOC (MTYPE_COMMUNITY_LIST_ENTRY, sizeof (struct community_entry));
 }
@@ -86,7 +86,7 @@ community_entry_free (struct community_entry *entry)
 
 /* Allocate a new community-list.  */
 static struct community_list *
-community_list_new ()
+community_list_new (void)
 {
   return XCALLOC (MTYPE_COMMUNITY_LIST, sizeof (struct community_list));
 }
index 64c6810f6b7a34de987d35944b5bf9b5a8cf2952..839927c89f6d6c1e79fcdb118a9dfe0b9f6f72bb 100644 (file)
@@ -617,7 +617,7 @@ community_str2com (const char *str)
 
 /* Return communities hash entry count.  */
 unsigned long
-community_count ()
+community_count (void)
 {
   return comhash->count;
 }
index 6b221e24e6ba753ee5f330487144be199bd40e33..4d9fc708a088e35b193f70a8c4370e765cfdf8ab 100644 (file)
@@ -34,7 +34,7 @@ struct hash *ecomhash;
 \f
 /* Allocate a new ecommunities.  */
 struct ecommunity *
-ecommunity_new ()
+ecommunity_new (void)
 {
   return (struct ecommunity *) XCALLOC (MTYPE_ECOMMUNITY,
                                        sizeof (struct ecommunity));
@@ -108,7 +108,7 @@ ecommunity_uniq_sort (struct ecommunity *ecom)
   if (! ecom)
     return NULL;
   
-  new = ecommunity_new ();;
+  new = ecommunity_new ();
   
   for (i = 0; i < ecom->size; i++)
     {
index eb4ff8eac52213dd2d02b7c984a8ce3a3fe93dc8..89e48bf8a8585027c9c3adf7dac8598f50a866d4 100644 (file)
@@ -47,10 +47,10 @@ struct as_list_master
   struct as_list_list str;
 
   /* Hook function which is executed when new access_list is added. */
-  void (*add_hook) ();
+  void (*add_hook) (void);
 
   /* Hook function which is executed when access_list is deleted. */
-  void (*delete_hook) ();
+  void (*delete_hook) (void);
 };
 
 /* Element of AS path filter. */
@@ -97,7 +97,7 @@ static struct as_list_master as_list_master =
 
 /* Allocate new AS filter. */
 static struct as_filter *
-as_filter_new ()
+as_filter_new (void)
 {
   return XCALLOC (MTYPE_AS_FILTER, sizeof (struct as_filter));
 }
@@ -173,7 +173,7 @@ as_list_lookup (const char *name)
 }
 
 static struct as_list *
-as_list_new ()
+as_list_new (void)
 {
   return XCALLOC (MTYPE_AS_LIST, sizeof (struct as_list));
 }
@@ -395,14 +395,14 @@ as_list_apply (struct as_list *aslist, void *object)
 
 /* Add hook function. */
 void
-as_list_add_hook (void (*func) ())
+as_list_add_hook (void (*func) (void))
 {
   as_list_master.add_hook = func;
 }
 
 /* Delete hook function. */
 void
-as_list_delete_hook (void (*func) ())
+as_list_delete_hook (void (*func) (void))
 {
   as_list_master.delete_hook = func;
 }
index 15bd8a6c837d97bd33e40f87b9896b8721c23816..924857310234811e1ced1fbe85c21f502efa47a7 100644 (file)
@@ -902,7 +902,7 @@ bgp_ignore (struct peer *peer)
 \f
 /* Finite State Machine structure */
 struct {
-  int (*func) ();
+  int (*func) (struct peer *);
   int next_state;
 } FSM [BGP_STATUS_MAX - 1][BGP_EVENTS_MAX - 1] = 
 {
index b2ee7f3b7ec4fc429f1ffda8d3b254a5a61071fc..67a49f7ad8687b46ce1c6079938eaf4c8b1398e9 100644 (file)
@@ -96,7 +96,7 @@ bnc_nexthop_free (struct bgp_nexthop_cache *bnc)
 }
 
 static struct bgp_nexthop_cache *
-bnc_new ()
+bnc_new (void)
 {
   return XCALLOC (MTYPE_BGP_NEXTHOP_CACHE, sizeof (struct bgp_nexthop_cache));
 }
@@ -695,7 +695,7 @@ bgp_nexthop_self (afi_t afi, struct attr *attr)
 }
 \f
 static struct bgp_nexthop_cache *
-zlookup_read ()
+zlookup_read (void)
 {
   struct stream *s;
   uint16_t length;
@@ -804,7 +804,7 @@ zlookup_query (struct in_addr addr)
 
 #ifdef HAVE_IPV6
 static struct bgp_nexthop_cache *
-zlookup_read_ipv6 ()
+zlookup_read_ipv6 (void)
 {
   struct stream *s;
   uint16_t length;
@@ -1277,7 +1277,7 @@ bgp_config_write_scan_time (struct vty *vty)
 }
 
 void
-bgp_scan_init ()
+bgp_scan_init (void)
 {
   zlookup = zclient_new ();
   zlookup->sock = -1;
index 5177dc073da0666e3edffd8e7d76e6d3564e4345..65f54e770926e00510aebab29ea5619eaf2328d1 100644 (file)
@@ -127,7 +127,7 @@ bgp_info_extra_get (struct bgp_info *ri)
 
 /* Allocate new bgp info structure. */
 static struct bgp_info *
-bgp_info_new ()
+bgp_info_new (void)
 {
   return XCALLOC (MTYPE_BGP_ROUTE, sizeof (struct bgp_info));
 }
@@ -2911,7 +2911,7 @@ bgp_clear_stale_route (struct peer *peer, afi_t afi, safi_t safi)
 \f
 /* Delete all kernel routes. */
 void
-bgp_cleanup_routes ()
+bgp_cleanup_routes (void)
 {
   struct bgp *bgp;
   struct listnode *node, *nnode;
@@ -2942,7 +2942,7 @@ bgp_cleanup_routes ()
 }
 
 void
-bgp_reset ()
+bgp_reset (void)
 {
   vty_reset ();
   bgp_zclient_reset ();
@@ -3114,7 +3114,7 @@ bgp_nlri_sanity_check (struct peer *peer, int afi, u_char *pnt,
 }
 \f
 static struct bgp_static *
-bgp_static_new ()
+bgp_static_new (void)
 {
   return XCALLOC (MTYPE_BGP_STATIC, sizeof (struct bgp_static));
 }
@@ -4499,7 +4499,7 @@ struct bgp_aggregate
 };
 
 static struct bgp_aggregate *
-bgp_aggregate_new ()
+bgp_aggregate_new (void)
 {
   return XCALLOC (MTYPE_BGP_AGGREGATE, sizeof (struct bgp_aggregate));
 }
@@ -10846,7 +10846,7 @@ struct bgp_distance
 };
 
 static struct bgp_distance *
-bgp_distance_new ()
+bgp_distance_new (void)
 {
   return XCALLOC (MTYPE_BGP_DISTANCE, sizeof (struct bgp_distance));
 }
@@ -10944,7 +10944,7 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,
 }
 
 static void
-bgp_distance_reset ()
+bgp_distance_reset (void)
 {
   struct bgp_node *rn;
   struct bgp_distance *bdistance;
@@ -11551,7 +11551,7 @@ bgp_config_write_distance (struct vty *vty, struct bgp *bgp)
 
 /* Allocate routing table structure and install commands. */
 void
-bgp_route_init ()
+bgp_route_init (void)
 {
   /* Init BGP distance table. */
   bgp_distance_table = bgp_table_init (AFI_IP, SAFI_UNICAST);
index 0f44e68d39d288de923a2a399414cd60319f62b6..1e37f266abda48dc55bbf541971f3385b12bb539 100644 (file)
@@ -882,7 +882,7 @@ bgpTrapBackwardTransition (struct peer *peer)
 }
 
 void
-bgp_snmp_init ()
+bgp_snmp_init (void)
 {
   smux_init (bm->master);
   REGISTER_MIB("mibII/bgp", bgp_variables, variable, bgp_oid);
index eb7c9f2703d880106562dff9294e82285bd566a6..663325678ea3f365df4ac3ebb9fd58276ef34264 100644 (file)
@@ -53,7 +53,7 @@ bgp_table_finish (struct bgp_table **rt)
 }
 
 static struct bgp_node *
-bgp_node_create ()
+bgp_node_create (void)
 {
   return XCALLOC (MTYPE_BGP_NODE, sizeof (struct bgp_node));
 }
index 1712c7198d0cd6aa1e36f4881b77c6855e19f725..3adede820e28778faf931c534094d6bb6ec93099 100644 (file)
@@ -1321,7 +1321,7 @@ peer_group_active (struct peer *peer)
 
 /* Peer group cofiguration. */
 static struct peer_group *
-peer_group_new ()
+peer_group_new (void)
 {
   return (struct peer_group *) XCALLOC (MTYPE_PEER_GROUP,
                                        sizeof (struct peer_group));
@@ -3929,7 +3929,7 @@ peer_aslist_unset (struct peer *peer,afi_t afi, safi_t safi, int direct)
 }
 
 static void
-peer_aslist_update ()
+peer_aslist_update (void)
 {
   afi_t afi;
   safi_t safi;
@@ -5136,7 +5136,7 @@ bgp_init (void)
 }
 
 void
-bgp_terminate ()
+bgp_terminate (void)
 {
   struct bgp *bgp;
   struct peer *peer;
index 4ba973a77a45581eb88782447d90c309e63ee0cc..ecf9ff904dbe2f47d61f3bf54488bdc50c4af732 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -444,7 +444,7 @@ if_dump (const struct interface *ifp)
 
 /* Interface printing for all interface. */
 void
-if_dump_all ()
+if_dump_all (void)
 {
   struct listnode *node;
   void *p;
index 5a0aea1ad76989c942794e97dcd91a5c075d19eb..cc4974ce6d32ca42d6db89c46a089e5b8fa685a1 100644 (file)
@@ -1403,7 +1403,7 @@ struct ospf_snmp_if
 };
 
 static struct ospf_snmp_if *
-ospf_snmp_if_new ()
+ospf_snmp_if_new (void)
 {
   return XCALLOC (0, sizeof (struct ospf_snmp_if));
 }
index e1fd0dc8f48f14b6e5ba873c422026ef82197041..dd2be8126cfb8af14e488e45f139517f06cb2d2f 100644 (file)
@@ -524,7 +524,7 @@ rtadv_make_socket (void)
 }
 \f
 static struct rtadv_prefix *
-rtadv_prefix_new ()
+rtadv_prefix_new (void)
 {
   return XCALLOC (MTYPE_RTADV_PREFIX, sizeof (struct rtadv_prefix));
 }