[Spice-devel] [PATCH slirp] Replace () with (void) in public function definitions

Christophe Fergeau cfergeau at redhat.com
Thu Apr 26 01:13:49 PDT 2012


ACK
I don't think we are using slirp much these days...

Christophe

On Wed, Apr 25, 2012 at 03:12:38PM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Functions with no arguments must use (void) in C
> ---
>  net_slirp.c |   12 ++++++------
>  net_slirp.h |    6 +++---
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/net_slirp.c b/net_slirp.c
> index e79802d..32b92bb 100644
> --- a/net_slirp.c
> +++ b/net_slirp.c
> @@ -131,7 +131,7 @@ static int get_dns_addr(struct in_addr *pdns_addr)
>  /*
>   * Get our IP address and put it in our_addr
>   */
> -static void getouraddr()
> +static void getouraddr(void)
>  {
>  	char buff[256];
>  	struct hostent *he = NULL;
> @@ -144,13 +144,13 @@ static void getouraddr()
>              our_addr.s_addr = loopback_addr.s_addr;
>  }
>  
> -static int need_fast_timer() 
> +static int need_fast_timer(void) 
>  {
>      // the timer will check if realy needed (if there is pending delayed ack)
>      return (if_queued || (tcb.so_next != &tcb));
>  }
>  
> -static int need_slow_timer() 
> +static int need_slow_timer(void) 
>  {
>      return ((tcb.so_next != &tcb) || (&ipq.ip_link != ipq.ip_link.next));
>  }
> @@ -320,7 +320,7 @@ int DLL_PUBLIC net_slirp_allocate_virtual_ip(struct in_addr *addr)
>      return alloc_virtual_ip(addr); // bootp
>  }
>  
> -void DLL_PUBLIC net_slirp_clear_virtual_ips()
> +void DLL_PUBLIC net_slirp_clear_virtual_ips(void)
>  {
>      clear_virtual_ips();
>  }
> @@ -381,13 +381,13 @@ SlirpSocket DLL_PUBLIC *net_slirp_tcp_socket_restore(void *export_socket, UserSo
>  }
>  
>  
> -void DLL_PUBLIC net_slirp_freeze()
> +void DLL_PUBLIC net_slirp_freeze(void)
>  {
>      slirp_freezed = TRUE;
>  }
>  
>  
> -void DLL_PUBLIC net_slirp_unfreeze()
> +void DLL_PUBLIC net_slirp_unfreeze(void)
>  {
>      slirp_freezed = FALSE;
>      if (!slow_timer_armed && need_slow_timer()) {
> diff --git a/net_slirp.h b/net_slirp.h
> index b5c7cdd..cc9901b 100644
> --- a/net_slirp.h
> +++ b/net_slirp.h
> @@ -38,7 +38,7 @@ void net_slirp_input(const uint8_t *pkt, int pkt_len);
>  // ips (because of problems when client/server restart or client changes network, and
>  // services were already installed). Maybe the netwrok mask should be extended too.
>  int net_slirp_allocate_virtual_ip(struct in_addr *addr); 
> -void net_slirp_clear_virtual_ips();
> +void net_slirp_clear_virtual_ips(void);
>  
>  void net_slirp_socket_connected_notify(SlirpSocket *sckt);
>  void net_slirp_socket_connect_failed_notify(SlirpSocket *sckt);
> @@ -58,8 +58,8 @@ void net_slirp_state_restore(void *export_state);
>  uint64_t net_slirp_tcp_socket_export(SlirpSocket *sckt, void **export_socket);
>  SlirpSocket *net_slirp_tcp_socket_restore(void *export_socket, UserSocket *usr_socket);
>  
> -void net_slirp_freeze();   // deactivate timers
> -void net_slirp_unfreeze(); // restore timers
> +void net_slirp_freeze(void);   // deactivate timers
> +void net_slirp_unfreeze(void); // restore timers
>  
>  #if 0
>  
> -- 
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120426/d1836083/attachment.pgp>


More information about the Spice-devel mailing list