[hipl-commit] [trunk] Rev 4074: Consistently use (void) to denote parameterless function declarations.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Mon, 29 Mar 2010 20:51:21 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 29/03/2010 at 20:51:21
Revision: 4074
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Consistently use (void) to denote parameterless function declarations.

Modified:
  M  firewall/pisa.c
  M  firewall/proxydb.c
  M  firewall/rule_management.c
  M  firewall/user_ipsec_sadb.c
  M  hipd/cookie.c
  M  hipd/dhtqueue.c
  M  hipd/hadb.c
  M  hipd/hi3.c
  M  hipd/hiprelay.c
  M  hipd/init.c
  M  hipd/maintenance.c
  M  hipd/nat.c
  M  hipd/nsupdate.c
  M  hipd/pfkeyapi.c
  M  hipd/registration.c
  M  hipd/update.c
  M  i3/chord/util.c
  M  i3/i3/i3_addr.c
  M  i3/i3/i3_config.c
  M  i3/i3/i3_header.c
  M  i3/i3/i3_id.c
  M  i3/i3/i3_options.c
  M  i3/i3/i3_stack.c
  M  i3/i3/i3_trigger.c
  M  i3/i3/token_bucket.c
  M  i3/i3_client/i3_client_api.c
  M  i3/i3_client/i3_client_context.c
  M  i3/i3_client/i3_client_id.c
  M  i3/i3_client/i3_client_trigger.c
  M  i3/i3_client/ping_thread.c
  M  i3/utils/inetfns.c
  M  lib/core/hip_udp.c
  M  lib/ipsec/pfkey.c
  M  lib/ipsec/policy_parse.c
  M  lib/ipsec/policy_parse.y
  M  lib/ipsec/policy_token.l
  M  lib/opphip/wrap_db.c
  M  lib/tool/xfrmapi.c
  M  test/misc_install.c

=== modified file 'firewall/pisa.c'
--- firewall/pisa.c     2010-03-18 21:15:21 +0000
+++ firewall/pisa.c     2010-03-29 17:50:59 +0000
@@ -97,7 +97,7 @@
     return 1;
 }
 
-void pisa_check_for_random_update()
+void pisa_check_for_random_update(void)
 {
     static time_t lastupdate = 0;
     time_t now;

=== modified file 'firewall/proxydb.c'
--- firewall/proxydb.c  2010-03-16 21:09:08 +0000
+++ firewall/proxydb.c  2010-03-29 17:50:59 +0000
@@ -83,7 +83,7 @@
 /**
  * Unitialize the proxy database
  */
-void hip_uninit_proxy_db()
+void hip_uninit_proxy_db(void)
 {
     int i = 0;
     hip_list_t *item, *tmp;

=== modified file 'firewall/rule_management.c'
--- firewall/rule_management.c  2010-03-18 21:15:21 +0000
+++ firewall/rule_management.c  2010-03-29 17:50:59 +0000
@@ -264,7 +264,7 @@
  *
  * @note: caller should take care of synchronization
  */
-void print_rule_tables()
+void print_rule_tables(void)
 {
     struct _DList *list = (struct _DList *) input_rules;
     struct rule *rule   = NULL;

=== modified file 'firewall/user_ipsec_sadb.c'
--- firewall/user_ipsec_sadb.c  2010-03-29 16:56:02 +0000
+++ firewall/user_ipsec_sadb.c  2010-03-29 17:50:59 +0000
@@ -834,7 +834,7 @@
  *
  * @return -1, if error occurred, else 0
  */
-int hip_sadb_init()
+int hip_sadb_init(void)
 {
     int err = 0;
 
@@ -856,7 +856,7 @@
  *
  * @return -1, if error occurred, else 0
  */
-int hip_sadb_uninit()
+int hip_sadb_uninit(void)
 {
     int err = 0;
 
@@ -981,7 +981,7 @@
  *
  * @return      -1, if error occurred, else 0
  */
-int hip_sadb_flush()
+int hip_sadb_flush(void)
 {
     int err               = 0, i = 0;
     hip_list_t *item      = NULL, *tmp = NULL;
@@ -1074,7 +1074,7 @@
 /**
  * prints the whole contents of the sadb
  */
-void hip_sadb_print()
+void hip_sadb_print(void)
 {
     int i                 = 0;
     hip_list_t *item      = NULL, *tmp = NULL;

=== modified file 'hipd/cookie.c'
--- hipd/cookie.c       2010-03-16 22:35:01 +0000
+++ hipd/cookie.c       2010-03-29 17:50:59 +0000
@@ -470,7 +470,7 @@
  *
  * @return zero on success or negative on error
  */
-int hip_recreate_all_precreated_r1_packets()
+int hip_recreate_all_precreated_r1_packets(void)
 {
     HIP_HASHTABLE *ht = hip_ht_init(hip_hidb_hash, hip_hidb_match);
     hip_list_t *curr, *iter;

=== modified file 'hipd/dhtqueue.c'
--- hipd/dhtqueue.c     2010-03-10 17:44:36 +0000
+++ hipd/dhtqueue.c     2010-03-29 17:50:59 +0000
@@ -70,7 +70,7 @@
  *
  * @return status of the operation 0 on success, -1 on failure
  */
-int hip_init_dht_queue()
+int hip_init_dht_queue(void)
 {
     if (hip_dht_queue == NULL) {
         hip_dht_queue = hip_ht_init(LHASH_HASH_FN(hip_dht_queue),
@@ -107,7 +107,7 @@
 /** A callback wrapper of the prototype required by @c lh_doall_arg(). */
 static IMPLEMENT_LHASH_DOALL_FN(hip_dht_queue_rec_free, struct hip_queue)
 
-void hip_dht_queue_uninit()
+void hip_dht_queue_uninit(void)
 {
 #ifdef CONFIG_HIP_DHT
     return;
@@ -216,7 +216,7 @@
  *
  * @ return void
  */
-static void hip_debug_print_dht_queue()
+static void hip_debug_print_dht_queue(void)
 {
     int i = 0;
     hip_list_t *item, *tmp;

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2010-03-17 13:11:49 +0000
+++ hipd/hadb.c 2010-03-29 17:50:59 +0000
@@ -1571,7 +1571,7 @@
 /**
  * Uninitialize host association database
  */
-void hip_uninit_hadb()
+void hip_uninit_hadb(void)
 {
     if (hadb_hit == NULL) {
         return;
@@ -1587,7 +1587,7 @@
  *
  * @todo currently this function is a no-op
  */
-void hip_delete_all_sp()
+void hip_delete_all_sp(void)
 {
     HIP_DEBUG("\n");
 

=== modified file 'hipd/hi3.c'
--- hipd/hi3.c  2010-03-16 14:35:23 +0000
+++ hipd/hi3.c  2010-03-29 17:50:59 +0000
@@ -54,7 +54,7 @@
  *
  * @return 0 on success, terminates program on i3 error
  */
-int hip_i3_init()
+int hip_i3_init(void)
 {
     if (cl_init(HIPL_HI3_FILE) != CL_RET_OK) {
         HIP_ERROR("hi3: error creating context!\n");
@@ -266,7 +266,7 @@
  *
  * @return 0 always
  */
-int hip_hi3_clean()
+int hip_hi3_clean(void)
 {
     int i = 0;
     for (i = 0; i < hi3_pub_tr_count; i++) {

=== modified file 'hipd/hiprelay.c'
--- hipd/hiprelay.c     2010-03-17 16:22:12 +0000
+++ hipd/hiprelay.c     2010-03-29 17:50:59 +0000
@@ -233,7 +233,7 @@
  *
  * @return HIP_RELAY_ON if the RVS / relay is "on", HIP_RELAY_OFF otherwise.
  */
-hip_relay_status_t hip_relay_get_status()
+hip_relay_status_t hip_relay_get_status(void)
 {
     return relay_enabled;
 }
@@ -415,7 +415,7 @@
  *
  * @return  number of relay records in the hashtable.
  */
-unsigned long hip_relht_size()
+unsigned long hip_relht_size(void)
 {
     if (hiprelay_ht == NULL) {
         return 0;
@@ -432,7 +432,7 @@
  * @todo a REG_RESPONSE with zero lifetime should be sent to each client whose
  *       registration is cancelled.
  */
-void hip_relht_maintenance()
+void hip_relht_maintenance(void)
 {
     if (hiprelay_ht == NULL) {
         return;
@@ -748,7 +748,7 @@
  * @return HIP_RELAY_ON if the RVS / relay whitelist is "on", HIP_RELAY_OFF
  *         otherwise.
  */
-hip_relay_wl_status_t hip_relwl_get_status()
+hip_relay_wl_status_t hip_relwl_get_status(void)
 {
     return whitelist_enabled;
 }
@@ -965,7 +965,7 @@
  * @note   The white list @c hiprelay_wl must be initialized before this
  *         function is called.
  */
-static int hip_relay_read_config()
+static int hip_relay_read_config(void)
 {
     FILE *fp    = NULL;
     int lineerr = 0, parseerr = 0, err = 0;
@@ -1075,7 +1075,7 @@
  * @return zero on success, -ENOENT if the file could not be opened for 
writing.
  * @note   Truncates existing file to zero length.
  */
-static int hip_relay_write_config()
+static int hip_relay_write_config(void)
 {
     int err  = 0;
     FILE *fp = NULL;
@@ -1509,7 +1509,7 @@
  * @return zero on success, -1 otherwise.
  * @note   do not call this function directly, instead call hip_relay_init().
  */
-static int hip_relht_init()
+static int hip_relht_init(void)
 {
     /* Check that the relay hashtable is not already initialized. */
     if (hiprelay_ht != NULL) {
@@ -1534,7 +1534,7 @@
  *
  * @note do not call this function directly, instead call hip_relay_uninit().
  */
-static void hip_relht_uninit()
+static void hip_relht_uninit(void)
 {
     if (hiprelay_ht == NULL) {
         return;
@@ -1549,7 +1549,7 @@
  * Initializes the HIP relay / RVS. Initializes the HIP relay hashtable and
  * whitelist.
  */
-int hip_relay_init()
+int hip_relay_init(void)
 {
     int err = 0;
 
@@ -1586,7 +1586,7 @@
  * Uninitializes the HIP relay / RVS. Uninitializes the HIP relay hashtable and
  * whitelist.
  */
-void hip_relay_uninit()
+void hip_relay_uninit(void)
 {
     hip_relht_uninit();
     hip_relwl_uninit();
@@ -1604,7 +1604,7 @@
  *
  * @return zero if the configuration file was read succesfully, -1 otherwise.
  */
-int hip_relay_reinit()
+int hip_relay_reinit(void)
 {
     int err = 0;
 
@@ -1625,7 +1625,7 @@
  * @return zero on success, -1 otherwise.
  * @note   do not call this function directly, instead call hip_relay_init().
  */
-static int hip_relwl_init()
+static int hip_relwl_init(void)
 {
     /* Check that the relay whitelist is not already initialized. */
     if (hiprelay_wl != NULL) {
@@ -1650,7 +1650,7 @@
  *
  * @note do not call this function directly, instead call hip_relay_uninit().
  */
-static void hip_relwl_uninit()
+static void hip_relwl_uninit(void)
 {
     if (hiprelay_wl == NULL) {
         return;

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-03-18 17:12:09 +0000
+++ hipd/init.c 2010-03-29 17:50:59 +0000
@@ -713,7 +713,7 @@
  *
  * @return zero on success or negative on failure
  */
-int hip_init_dht()
+int hip_init_dht(void)
 {
     int err         = 0;
 
@@ -836,7 +836,7 @@
  *
  * @return zero on success or negative on failure
  */
-static int hip_init_host_ids()
+static int hip_init_host_ids(void)
 {
     int err                     = 0;
     struct stat status;
@@ -1200,7 +1200,7 @@
  *
  * @return zero on success or negative on failure
  */
-static int init_random_seed()
+static int init_random_seed(void)
 {
     struct timeval tv;
     struct timezone tz;

=== modified file 'hipd/maintenance.c'
--- hipd/maintenance.c  2010-03-18 12:09:47 +0000
+++ hipd/maintenance.c  2010-03-29 17:50:59 +0000
@@ -349,7 +349,7 @@
  *
  * @return zero on success or negative on failure
  */
-int hip_periodic_maintenance()
+int hip_periodic_maintenance(void)
 {
     int err = 0;
 
@@ -489,7 +489,7 @@
  * @return one if firewall is running or zero otherwise
  * @todo this is redundant with hip_firewall_is_alive()
  */
-int hip_get_firewall_status()
+int hip_get_firewall_status(void)
 {
     return hip_firewall_status;
 }
@@ -500,7 +500,7 @@
  *
  * @return one if firewall is running or zero otherwise
  */
-int hip_firewall_is_alive()
+int hip_firewall_is_alive(void)
 {
 #ifdef CONFIG_HIP_FIREWALL
     if (hip_firewall_status) {

=== modified file 'hipd/nat.c'
--- hipd/nat.c  2010-03-18 12:09:47 +0000
+++ hipd/nat.c  2010-03-29 17:50:59 +0000
@@ -92,7 +92,7 @@
  *
  * @return zero on success, or negative error value on error.
  */
-int hip_nat_refresh_port()
+int hip_nat_refresh_port(void)
 {
     int err = 0;
 
@@ -203,7 +203,7 @@
  * @note This is needed only for simulation purposes and can be removed from
  *       released versions of HIPL.
  */
-static void hip_nat_randomize_nat_ports()
+static void hip_nat_randomize_nat_ports(void)
 {
     unsigned int secs_since_epoch = (unsigned int) time(NULL);
     HIP_DEBUG("Randomizing UDP ports to be used.\n");

=== modified file 'hipd/nsupdate.c'
--- hipd/nsupdate.c     2010-03-18 21:15:21 +0000
+++ hipd/nsupdate.c     2010-03-29 17:50:59 +0000
@@ -123,7 +123,7 @@
 /*
  * Close file descriptors except for the standard output and the standard error
  */
-static int close_all_fds_except_stdout_and_stderr()
+static int close_all_fds_except_stdout_and_stderr(void)
 {
     /* get maximum file descriptor number that can be opened */
     struct rlimit rlim;

=== modified file 'hipd/pfkeyapi.c'
--- hipd/pfkeyapi.c     2010-03-18 13:02:44 +0000
+++ hipd/pfkeyapi.c     2010-03-29 17:50:59 +0000
@@ -51,7 +51,7 @@
  *
  * @return zero on success and negative on error
  */
-int hip_flush_all_policy()
+int hip_flush_all_policy(void)
 {
     int so, len, err = 0;
     HIP_DEBUG("\n");
@@ -72,7 +72,7 @@
  *
  * @return zero on success and negative on error
  */
-int hip_flush_all_sa()
+int hip_flush_all_sa(void)
 {
     int so, len, err = 0;
     HIP_DEBUG("\n");
@@ -444,7 +444,7 @@
  * delete the default Security Policy pair that triggers base exchanges
  *
  */
-void hip_delete_default_prefix_sp_pair()
+void hip_delete_default_prefix_sp_pair(void)
 {
     // Currently unused
     HIP_DEBUG("\n");
@@ -456,7 +456,7 @@
  *
  * @return zero on success and negative on failure
  */
-int hip_setup_default_sp_prefix_pair()
+int hip_setup_default_sp_prefix_pair(void)
 {
     // currently this function is not needed
     HIP_DEBUG("\n");

=== modified file 'hipd/registration.c'
--- hipd/registration.c 2010-03-18 16:21:26 +0000
+++ hipd/registration.c 2010-03-29 17:50:59 +0000
@@ -97,7 +97,7 @@
  * An expired pending requests is one that has not been deleted within
  * @c HIP_PENDING_REQUEST_LIFETIME seconds.
  */
-void hip_registration_maintenance()
+void hip_registration_maintenance(void)
 {
     while (hip_del_pending_request_by_expiration() == 0) {
         ;

=== modified file 'hipd/update.c'
--- hipd/update.c       2010-03-18 17:59:27 +0000
+++ hipd/update.c       2010-03-29 17:50:59 +0000
@@ -438,7 +438,7 @@
  *
  * @return zero on success or negative on failure
  */
-int hip_send_locators_to_all_peers()
+int hip_send_locators_to_all_peers(void)
 {
     int err                   = 0;
     struct hip_locator_info_addr_item *locators;

=== modified file 'i3/chord/util.c'
--- i3/chord/util.c     2010-02-17 17:38:08 +0000
+++ i3/chord/util.c     2010-03-29 17:50:59 +0000
@@ -527,7 +527,7 @@
     print_current_time(" @ ", "\n");
 }
 
-unsigned long get_current_time()
+unsigned long get_current_time(void)
 {
 #ifdef SIM_CHORD
     return (unsigned long) sim_get_time();

=== modified file 'i3/i3/i3_addr.c'
--- i3/i3/i3_addr.c     2010-02-17 17:38:08 +0000
+++ i3/i3/i3_addr.c     2010-03-29 17:50:59 +0000
@@ -29,7 +29,7 @@
 *  return:
 *    pointer to the allocated data structure
 ***************************************************************************/
-i3_addr *alloc_i3_addr()
+i3_addr *alloc_i3_addr(void)
 {
     i3_addr *addr;
 

=== modified file 'i3/i3/i3_config.c'
--- i3/i3/i3_config.c   2010-02-17 17:38:08 +0000
+++ i3/i3/i3_config.c   2010-03-29 17:50:59 +0000
@@ -64,7 +64,7 @@
     }
 }
 
-void release_params()
+void release_params(void)
 {
     xmlFreeDoc(i3_config_doc);
     //xmlCleanupParser();

=== modified file 'i3/i3/i3_header.c'
--- i3/i3/i3_header.c   2010-02-17 17:38:08 +0000
+++ i3/i3/i3_header.c   2010-03-29 17:50:59 +0000
@@ -20,7 +20,7 @@
 *    pointer to the allocated data structure
 ***************************************************************************/
 
-i3_header *alloc_i3_header()
+i3_header *alloc_i3_header(void)
 {
     struct i3_header *hdr;
 

=== modified file 'i3/i3/i3_id.c'
--- i3/i3/i3_id.c       2010-02-17 17:38:08 +0000
+++ i3/i3/i3_id.c       2010-03-29 17:50:59 +0000
@@ -20,7 +20,7 @@
 *    allocated identifier
 ***************************************************************************/
 
-ID *alloc_i3_id()
+ID *alloc_i3_id(void)
 {
     ID *id;
 

=== modified file 'i3/i3/i3_options.c'
--- i3/i3/i3_options.c  2010-02-17 17:38:08 +0000
+++ i3/i3/i3_options.c  2010-03-29 17:50:59 +0000
@@ -20,7 +20,7 @@
 *  return:
 *    pointer to the allocated data structure
 ***************************************************************************/
-struct i3_option *alloc_i3_option()
+struct i3_option *alloc_i3_option(void)
 {
     struct i3_option *option;
 
@@ -152,7 +152,7 @@
     free(option);
 }
 
-i3_option_list *alloc_i3_option_list()
+i3_option_list *alloc_i3_option_list(void)
 {
     i3_option_list *option_list;
 

=== modified file 'i3/i3/i3_stack.c'
--- i3/i3/i3_stack.c    2010-02-17 17:38:08 +0000
+++ i3/i3/i3_stack.c    2010-03-29 17:50:59 +0000
@@ -20,7 +20,7 @@
 *    pointer to the allocated stack
 ***************************************************************************/
 
-i3_stack *alloc_i3_stack()
+i3_stack *alloc_i3_stack(void)
 {
     i3_stack *stack;
 

=== modified file 'i3/i3/i3_trigger.c'
--- i3/i3/i3_trigger.c  2010-02-17 17:38:08 +0000
+++ i3/i3/i3_trigger.c  2010-03-29 17:50:59 +0000
@@ -22,7 +22,7 @@
 *    pointer to the allocated data structure
 ***************************************************************************/
 
-i3_trigger *alloc_i3_trigger()
+i3_trigger *alloc_i3_trigger(void)
 {
     i3_trigger *trigger;
 

=== modified file 'i3/i3/token_bucket.c'
--- i3/i3/token_bucket.c        2010-02-17 17:38:08 +0000
+++ i3/i3/token_bucket.c        2010-03-29 17:50:59 +0000
@@ -20,7 +20,7 @@
 *    pointer to the allocated token bucket
 ***************************************************************************/
 
-token_bucket *alloc_token_bucket()
+token_bucket *alloc_token_bucket(void)
 {
     token_bucket *tb;
 
@@ -116,7 +116,7 @@
     *length += sizeof(uint32_t);
 }
 
-unsigned short get_token_bucket_len()
+unsigned short get_token_bucket_len(void)
 {
     return 3 * sizeof(uint32_t) + sizeof(uint8_t);
 }

=== modified file 'i3/i3_client/i3_client_api.c'
--- i3/i3_client/i3_client_api.c        2010-02-17 17:38:08 +0000
+++ i3/i3_client/i3_client_api.c        2010-03-29 17:50:59 +0000
@@ -84,7 +84,7 @@
  *        This error usually occurs when a cl_init() was initially omitted.
  *        </ul>
  */
-int cl_exit()
+int cl_exit(void)
 {
     int rc;
 

=== modified file 'i3/i3_client/i3_client_context.c'
--- i3/i3_client/i3_client_context.c    2010-03-09 15:41:40 +0000
+++ i3/i3_client/i3_client_context.c    2010-03-29 17:50:59 +0000
@@ -865,7 +865,7 @@
 }
 
 /* get local address -- use fn in utils/ */
-struct in_addr get_local_addr_cl()
+struct in_addr get_local_addr_cl(void)
 {
     struct in_addr ia;
     ia.s_addr = ntohl(get_local_addr());

=== modified file 'i3/i3_client/i3_client_id.c'
--- i3/i3_client/i3_client_id.c 2010-02-17 17:38:08 +0000
+++ i3/i3_client/i3_client_id.c 2010-03-29 17:50:59 +0000
@@ -12,7 +12,7 @@
 #include "../i3/i3_debug.h"
 #include "../utils/netwrap.h"
 
-cl_id *cl_alloc_id()
+cl_id *cl_alloc_id(void)
 {
     cl_id *cid;
 

=== modified file 'i3/i3_client/i3_client_trigger.c'
--- i3/i3_client/i3_client_trigger.c    2010-03-09 18:26:22 +0000
+++ i3/i3_client/i3_client_trigger.c    2010-03-29 17:50:59 +0000
@@ -195,7 +195,7 @@
 }
 
 /* basic operations for manipulating triggers on the client side */
-cl_trigger *cl_alloc_trigger()
+cl_trigger *cl_alloc_trigger(void)
 {
     cl_trigger *ctr;
 

=== modified file 'i3/i3_client/ping_thread.c'
--- i3/i3_client/ping_thread.c  2010-03-09 15:41:40 +0000
+++ i3/i3_client/ping_thread.c  2010-03-29 17:50:59 +0000
@@ -284,7 +284,7 @@
 
 /** This function is called to close the ping socket
  */
-void close_ping_socket()
+void close_ping_socket(void)
 {
     if (ping_sock != -1) {
         nw_close(ping_sock);

=== modified file 'i3/utils/inetfns.c'
--- i3/utils/inetfns.c  2010-02-17 17:38:08 +0000
+++ i3/utils/inetfns.c  2010-03-29 17:50:59 +0000
@@ -236,7 +236,7 @@
     return addr;
 }
 
-uint32_t get_local_addr_eth()
+uint32_t get_local_addr_eth(void)
 {
     return get_local_addr();
 }
@@ -279,7 +279,7 @@
     }
 }
 
-uint32_t get_local_addr_uname()
+uint32_t get_local_addr_uname(void)
 {
     char *buf;
     int buf_size = 1024;
@@ -300,8 +300,7 @@
 }
 
 /*
- * uint32_t
- * get_local_addr()
+ * uint32_t get_local_addr(void)
  * {
  *  // - retrieve information about all network adapters
  *  // - look for the first non-loopback interface

=== modified file 'lib/core/hip_udp.c'
--- lib/core/hip_udp.c  2010-03-08 22:21:34 +0000
+++ lib/core/hip_udp.c  2010-03-29 17:50:59 +0000
@@ -21,7 +21,7 @@
  *
  * @return the default local UDP port
  */
-in_port_t hip_get_local_nat_udp_port()
+in_port_t hip_get_local_nat_udp_port(void)
 {
     return hip_local_nat_udp_port;
 }
@@ -31,7 +31,7 @@
  *
  * @return the default remote UDP port
  */
-in_port_t hip_get_peer_nat_udp_port()
+in_port_t hip_get_peer_nat_udp_port(void)
 {
     return hip_peer_nat_udp_port;
 }

=== modified file 'lib/ipsec/pfkey.c'
--- lib/ipsec/pfkey.c   2010-03-11 08:59:28 +0000
+++ lib/ipsec/pfkey.c   2010-03-29 17:50:59 +0000
@@ -1791,7 +1791,7 @@
  *      -1: fail.
  *      others : success and return value of socket.
  */
-int pfkey_open()
+int pfkey_open(void)
 {
     int so;
     int bufsiz = 128 * 1024;            /*is 128K enough?*/

=== modified file 'lib/ipsec/policy_parse.c'
--- lib/ipsec/policy_parse.c    2010-03-09 18:26:22 +0000
+++ lib/ipsec/policy_parse.c    2010-03-29 17:50:59 +0000
@@ -396,7 +396,7 @@
 }
 
 static int
-rule_check()
+rule_check(void)
 {
         if (p_type == IPSEC_POLICY_IPSEC) {
                 if (p_protocol == IPPROTO_IP) {
@@ -427,7 +427,7 @@
 }
 
 static int
-init_x_policy()
+init_x_policy(void)
 {
         struct sadb_x_policy *p;
 
@@ -522,7 +522,7 @@
 }
 
 static void
-policy_parse_request_init()
+policy_parse_request_init(void)
 {
         p_protocol = IPPROTO_IP;
         p_mode = IPSEC_MODE_ANY;

=== modified file 'lib/ipsec/policy_parse.y'
--- lib/ipsec/policy_parse.y    2010-03-11 08:59:28 +0000
+++ lib/ipsec/policy_parse.y    2010-03-29 17:50:59 +0000
@@ -435,7 +435,7 @@
 }
 
 static int
-rule_check()
+rule_check(void)
 {
         if (p_type == IPSEC_POLICY_IPSEC) {
                 if (p_protocol == IPPROTO_IP) {
@@ -466,7 +466,7 @@
 }
 
 static int
-init_x_policy()
+init_x_policy(void)
 {
         struct sadb_x_policy *p;
 
@@ -561,7 +561,7 @@
 }
 
 static void
-policy_parse_request_init()
+policy_parse_request_init(void)
 {
         p_protocol = IPPROTO_IP;
         p_mode = IPSEC_MODE_ANY;

=== modified file 'lib/ipsec/policy_token.l'
--- lib/ipsec/policy_token.l    2010-03-09 18:26:22 +0000
+++ lib/ipsec/policy_token.l    2010-03-29 17:50:59 +0000
@@ -185,7 +185,7 @@
 }
 
 void
-__policy__strbuffer__free__()
+__policy__strbuffer__free__(void)
 {
         yy_delete_buffer(strbuffer);
 

=== modified file 'lib/opphip/wrap_db.c'
--- lib/opphip/wrap_db.c        2010-03-09 18:26:22 +0000
+++ lib/opphip/wrap_db.c        2010-03-29 17:50:59 +0000
@@ -100,7 +100,7 @@
  * Initialize the opportunistic database
  *
  */
-void hip_init_socket_db()
+void hip_init_socket_db(void)
 {
     socketdb = hip_ht_init(LHASH_HASH_FN(hip_pid_socket),
                            LHASH_COMP_FN(hip_socketdb));
@@ -128,7 +128,7 @@
  * uninitialize the opportunistic mode database
  *
  */
-void hip_uninit_socket_db()
+void hip_uninit_socket_db(void)
 {
     int i = 0;
     hip_list_t *item, *tmp;
@@ -171,7 +171,7 @@
  * display the contents of the database
  *
  */
-void hip_socketdb_dump()
+void hip_socketdb_dump(void)
 {
     int i;
     hip_list_t *item, *tmp;

=== modified file 'lib/tool/xfrmapi.c'
--- lib/tool/xfrmapi.c  2010-03-18 21:15:21 +0000
+++ lib/tool/xfrmapi.c  2010-03-29 17:50:59 +0000
@@ -511,7 +511,7 @@
  *
  * @return zero on success and negative on error
  */
-int hip_flush_all_policy()
+int hip_flush_all_policy(void)
 {
     return hip_xfrm_policy_flush(hip_xfrmapi_nl_ipsec);
 }
@@ -521,7 +521,7 @@
  *
  * @return zero on success and negative on error
  */
-int hip_flush_all_sa()
+int hip_flush_all_sa(void)
 {
     return hip_xfrm_sa_flush(hip_xfrmapi_nl_ipsec);
 }
@@ -746,7 +746,7 @@
  * delete the default Security Policy pair that triggers base exchanges
  *
  */
-void hip_delete_default_prefix_sp_pair()
+void hip_delete_default_prefix_sp_pair(void)
 {
     hip_hit_t src_hit, dst_hit;
     memset(&src_hit, 0, sizeof(hip_hit_t));
@@ -765,7 +765,7 @@
  *
  * @return zero on success and negative on failure
  */
-int hip_setup_default_sp_prefix_pair()
+int hip_setup_default_sp_prefix_pair(void)
 {
     int err = 0;
     hip_hit_t src_hit, dst_hit;

=== modified file 'test/misc_install.c'
--- test/misc_install.c 2010-03-19 09:00:54 +0000
+++ test/misc_install.c 2010-03-29 17:50:59 +0000
@@ -8,7 +8,7 @@
 
 #include "misc_install.h"
 
-int init_daemon()
+int init_daemon(void)
 {
     int err = 0;
     /***************************************
@@ -33,7 +33,7 @@
     return err;
 }
 
-int install_module()
+int install_module(void)
 {
     int err;
     err = system("grep -q hipmod /proc/modules");

Other related posts:

  • » [hipl-commit] [trunk] Rev 4074: Consistently use (void) to denote parameterless function declarations. - Diego Biurrun