}
/* SIGINT handler. */
-void
+__attribute__((__noreturn__)) void
sigint (void)
{
zlog_notice ("Terminating on signal");
Zebra route removal and protocol teardown are not meant to be done here.
For example, "retain_mode" may be set.
*/
-static void
+static __attribute__((__noreturn__)) void
bgp_exit (int status)
{
struct bgp *bgp;
safe_strerror (errno));
}
-static void
+static __attribute__((__noreturn__)) void
terminate (int i)
{
exit (i);
return;
}
-void
+__attribute__((__noreturn__)) void
sigint (void)
{
zlog_notice ("Terminating on signal SIGINT");
terminate (0);
}
-void
+__attribute__((__noreturn__)) void
sigterm (void)
{
zlog_notice ("Terminating on signal SIGTERM");
long nrand(long);
void free_arc(void *);
-unsigned long timer ()
+unsigned long timer (void)
{ struct tms hold;
times(&hold);
#define B 2147483647
#define BF 2147483647.
-static long irand ()
+static long irand (void)
{ internal_seed = ( internal_seed * A ) & B;
return (long) internal_seed ;
#define A1 37252
#define A2 29589
-static long xrand()
+static long xrand(void)
{ unsigned long is1, is2;
/*********************************************************************/
-double rand01()
+double rand01(void)
{ return (double) (irand() / BF) ;
}
#define NK 12
-double randg01()
+double randg01(void)
{ int i;
double sum = 0;
in6addr_cmp (struct in6_addr *addr1, struct in6_addr *addr2)
{
unsigned int i;
- u_char *p1, *p2;
+ const u_char *p1, *p2;
- p1 = (u_char *)addr1;
- p2 = (u_char *)addr2;
+ p1 = (const u_char *)addr1;
+ p2 = (const u_char *)addr2;
for (i = 0; i < sizeof (struct in6_addr); i++)
{
* ---------------------------------------------------------
*/
-static int usage()
+static int usage(void)
{
printf("Usage: ospfclient <ospfd> <lsatype> <opaquetype> <opaqueid> <ifaddr> <areaid>\n");
printf("where ospfd : router where API-enabled OSPF daemon is running\n");
static unsigned int spf_reason_flags = 0;
-static void ospf_clear_spf_reason_flags ()
+static void ospf_clear_spf_reason_flags (void )
{
spf_reason_flags = 0;
}
}
static struct ripng_offset_list *
-ripng_offset_list_new ()
+ripng_offset_list_new (void)
{
struct ripng_offset_list *new;
#include "ripngd/ripng_route.h"
static struct ripng_aggregate *
-ripng_aggregate_new ()
+ripng_aggregate_new (void)
{
struct ripng_aggregate *new;
}
struct config *
-config_new ()
+config_new (void)
{
struct config *config;
config = XCALLOC (MTYPE_VTYSH_CONFIG, sizeof (struct config));
struct list *userlist;
struct vtysh_user *
-user_new ()
+user_new (void)
{
return XCALLOC (0, sizeof (struct vtysh_user));
}
* Check if an asynchronous connect() to the FPM is complete.
*/
static void
-zfpm_connect_check ()
+zfpm_connect_check (void)
{
int status;
socklen_t slen;