/*
- * $Id: hqx.c,v 1.16 2009-10-14 01:38:28 didg Exp $
+ * $Id: hqx.c,v 1.17 2009-10-14 02:24:04 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#endif /* HEXOUTPUT */
if (( headerbuf =
- (char *)malloc( (unsigned int)( namelen + BHH_HEADSIZ ))) == 0 ) {
+ (char *)malloc( (unsigned int)( namelen + BHH_HEADSIZ ))) == NULL ) {
return( -1 );
}
if ( hqx_7tobin( headerbuf, ( namelen + BHH_HEADSIZ )) == 0 ) {
/*
- * $Id: megatron.c,v 1.12 2009-10-14 01:38:28 didg Exp $
+ * $Id: megatron.c,v 1.13 2009-10-14 02:24:04 didg Exp $
*/
#ifdef HAVE_CONFIG_H
char *progname, newname[ADEDLEN_NAME + 1];
progname = strrchr( argv[ 0 ], '/' );
- if (( progname == NULL ) || ( progname == '\0' )) {
+ if (( progname == NULL ) || ( *progname == '\0' )) {
progname = argv[ 0 ];
} else progname++;
/*
- * $Id: nbplkup.c,v 1.7 2009-10-14 01:38:28 didg Exp $
+ * $Id: nbplkup.c,v 1.8 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
{
char *p;
- if (( p = strrchr( av0, '/' )) == 0 ) {
+ if (( p = strrchr( av0, '/' )) == NULL ) {
p = av0;
} else {
p++;
/*
- * $Id: nbprgstr.c,v 1.7 2009-10-14 01:38:28 didg Exp $
+ * $Id: nbprgstr.c,v 1.8 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
{
char *p;
- if (( p = strrchr( av0, '/' )) == 0 ) {
+ if (( p = strrchr( av0, '/' )) == NULL ) {
p = av0;
} else {
p++;
{
struct sockaddr_at addr;
struct at_addr ataddr;
- char *Obj = 0, *Type = 0, *Zone = 0;
- char *convname = 0;
+ char *Obj = NULL, *Type = NULL, *Zone = NULL;
+ char *convname = NULL;
int s, c, port = 0;
charset_t chMac = CH_MAC;
/*
- * $Id: nbpunrgstr.c,v 1.8 2009-10-14 01:38:28 didg Exp $
+ * $Id: nbpunrgstr.c,v 1.9 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
{
char *p;
- if (( p = strrchr( av0, '/' )) == 0 ) {
+ if (( p = strrchr( av0, '/' )) == NULL ) {
p = av0;
} else {
p++;
int main(int ac, char **av)
{
- char *Obj = 0, *Type = 0, *Zone = 0;
- char *convname = 0;
+ char *Obj = NULL, *Type = NULL, *Zone = NULL;
+ char *convname = NULL;
struct at_addr addr;
int c;
charset_t chMac = CH_MAC;
/*
- * $Id: pap.c,v 1.12 2009-10-14 01:38:28 didg Exp $
+ * $Id: pap.c,v 1.13 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
cbuf[ 2 ] = cbuf[ 3 ] = 0;
cbuf[ 4 ] = atp_sockaddr( atp )->sat_port;
cbuf[ 5 ] = oquantum; /* flow quantum */
- if ( gettimeofday( &stv, 0 ) < 0 ) {
+ if ( gettimeofday( &stv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
if ( cuts ) {
waiting = 0xffff;
} else {
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
int cc, i;
unsigned short netseq;
- if ( gettimeofday( &stv, 0 ) < 0 ) {
+ if ( gettimeofday( &stv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
if(debug){ printf( "READ %d >\n", seq ), fflush( stdout );}
for (;;) {
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
}
FD_SET( atp_fileno( atp ), &fds );
- if (( cc = select( FD_SETSIZE, &fds, 0, 0, &tv )) < 0 ) {
+ if (( cc = select( FD_SETSIZE, &fds, NULL, NULL, &tv )) < 0 ) {
perror( "select" );
exit( 2 );
}
/*
- * $Id: pa.c,v 1.5 2009-10-13 22:55:36 didg Exp $
+ * $Id: pa.c,v 1.6 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
h->bufsz = PA_BUFBLK * 2;
if (( rc = read( fd, h->buf, PA_BUFBLK )) < 0 ) {
- return( 0 );
+ return( NULL );
}
h->cur = h->buf - 1;
/*
- * $Id: psorder.c,v 1.8 2009-10-14 01:38:28 didg Exp $
+ * $Id: psorder.c,v 1.9 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
{
off_t ccread = 0;
off_t ccmatch;
- char *curtok = 0;
+ char *curtok = NULL;
FILE *tempstream;
pa_buf_t *pb;
int n;
/*
- * $Id: afp_asp.c,v 1.25 2009-10-14 01:38:28 didg Exp $
+ * $Id: afp_asp.c,v 1.26 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
it.it_interval.tv_usec = 0;
it.it_value.tv_sec = 300;
it.it_value.tv_usec = 0;
- if ( setitimer( ITIMER_REAL, &it, 0 ) < 0 ) {
+ if ( setitimer( ITIMER_REAL, &it, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: setitimer: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sigaddset(&sv.sa_mask, SIGHUP);
sigaddset(&sv.sa_mask, SIGTERM);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGALRM, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGALRM, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: sigaction: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sv.sa_handler = SIG_IGN;
sigemptyset( &sv.sa_mask );
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR1, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGUSR1, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: sigaction SIGUSR1: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGHUP, &action, 0 ) < 0 ) {
+ if ( sigaction( SIGHUP, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGTERM, &action, 0 ) < 0 ) {
+ if ( sigaction( SIGTERM, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR1);
sigaddset(&action.sa_mask, SIGHUP);
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR2, &action, 0) < 0 ) {
+ if ( sigaction( SIGUSR2, &action, NULL) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR1, &action, 0 ) < 0 ) {
+ if ( sigaction( SIGUSR1, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
afp_asp_die(EXITERR_SYS);
}
/*
- * $Id: afp_dsi.c,v 1.39 2009-10-14 01:38:28 didg Exp $
+ * $Id: afp_dsi.c,v 1.40 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
it.it_value.tv_sec = 300;
it.it_value.tv_usec = 0;
- if ( setitimer( ITIMER_REAL, &it, 0 ) < 0 ) {
+ if ( setitimer( ITIMER_REAL, &it, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: setitimer: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sigaddset(&sv.sa_mask, SIGHUP);
sigaddset(&sv.sa_mask, SIGTERM);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGALRM, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGALRM, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: sigaction: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sv.sa_handler = SIG_IGN;
sigemptyset( &sv.sa_mask );
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR1, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGUSR1, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_timedown: sigaction SIGHUP: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGHUP, &action, 0 ) < 0 ) {
+ if ( sigaction( SIGHUP, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_dsi: sigaction: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGTERM, &action, 0 ) < 0 ) {
+ if ( sigaction( SIGTERM, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_dsi: sigaction: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR1);
sigaddset(&action.sa_mask, SIGHUP);
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR2, &action, 0) < 0 ) {
+ if ( sigaction( SIGUSR2, &action, NULL) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_dsi: sigaction: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
sigaddset(&action.sa_mask, SIGUSR2);
#endif
action.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR1, &action, 0) < 0 ) {
+ if ( sigaction( SIGUSR1, &action, NULL) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_dsi: sigaction: %s", strerror(errno) );
afp_dsi_die(EXITERR_SYS);
}
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
*
- * $Id: hash.c,v 1.1 2005-04-30 21:33:41 didg Exp $
+ * $Id: hash.c,v 1.2 2009-10-14 02:24:05 didg Exp $
* $Name: $
*/
#define NDEBUG
#include "hash.h"
#ifdef KAZLIB_RCSID
-static const char rcsid[] = "$Id: hash.c,v 1.1 2005-04-30 21:33:41 didg Exp $";
+static const char rcsid[] = "$Id: hash.c,v 1.2 2009-10-14 02:24:05 didg Exp $";
#endif
#define INIT_BITS 6
assert (mask != hash->mask);
for (chain = 0; chain < hash->nchains; chain++) { /* 7 */
- hnode_t *low_chain = 0, *high_chain = 0, *hptr, *next;
+ hnode_t *low_chain = NULL, *high_chain = NULL, *hptr, *next;
- for (hptr = newtable[chain]; hptr != 0; hptr = next) {
+ for (hptr = newtable[chain]; hptr != NULL; hptr = next) {
next = hptr->next;
if (hptr->hkey & exposed_bit) {
high_chain = hash->table[chain + nchains];
for (low_tail = low_chain; low_tail && low_tail->next; low_tail = low_tail->next)
; /* 3 */
- if (low_chain != 0) /* 4 */
+ if (low_chain != NULL) /* 4 */
low_tail->next = high_chain;
- else if (high_chain != 0) /* 5 */
+ else if (high_chain != NULL) /* 5 */
hash->table[chain] = high_chain;
else
assert (hash->table[chain] == NULL); /* 6 */
/* 1 */
- for (chain = 0; chain < nchains && hash->table[chain] == 0; chain++)
+ for (chain = 0; chain < nchains && hash->table[chain] == NULL; chain++)
;
if (chain < nchains) { /* 2 */
if (next->next) { /* 4 */
scan->next = next->next;
} else {
- while (chain < nchains && hash->table[chain] == 0) /* 5 */
+ while (chain < nchains && hash->table[chain] == NULL) /* 5 */
chain++;
if (chain < nchains) { /* 6 */
scan->chain = chain;
}
for (chain = 0; chain < hash->nchains; chain++) { /* 2 */
- for (hptr = hash->table[chain]; hptr != 0; hptr = hptr->next) {
+ for (hptr = hash->table[chain]; hptr != NULL; hptr = hptr->next) {
if ((hptr->hkey & hash->mask) != chain)
return 0;
count++;
/*
- * $Id: main.c,v 1.25 2009-10-13 22:55:37 didg Exp $
+ * $Id: main.c,v 1.26 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
sigaddset(&sv.sa_mask, SIGUSR1);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGCHLD, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGCHLD, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
afp_exit(EXITERR_SYS);
}
sigaddset(&sv.sa_mask, SIGHUP);
sigaddset(&sv.sa_mask, SIGCHLD);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGUSR1, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGUSR1, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
afp_exit(EXITERR_SYS);
}
sigaddset(&sv.sa_mask, SIGUSR1);
sigaddset(&sv.sa_mask, SIGCHLD);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGHUP, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGHUP, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
afp_exit(EXITERR_SYS);
}
sigaddset(&sv.sa_mask, SIGUSR1);
sigaddset(&sv.sa_mask, SIGCHLD);
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGTERM, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGTERM, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
afp_exit(EXITERR_SYS);
}
/*
- * $Id: quota.c,v 1.31 2009-10-13 22:55:37 didg Exp $
+ * $Id: quota.c,v 1.32 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return( 0 );
}
#else /* ultrix */
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "overquota: gettimeofday: %s", strerror(errno) );
return( AFPERR_PARAM );
}
/*
- * $Id: volume.c,v 1.92 2009-10-13 22:55:37 didg Exp $
+ * $Id: volume.c,v 1.93 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*rbuflen = data - rbuf;
data = rbuf;
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_getsrvrparms(%s): gettimeofday: %s", volume->v_path, strerror(errno) );
*rbuflen = 0;
return AFPERR_PARAM;
if (!(afp_version > 21 && obj->options.server_notif))
return 0;
- if ( gettimeofday( &tv, 0 ) < 0 )
+ if ( gettimeofday( &tv, NULL ) < 0 )
return 0;
for ( vol = Volumes; vol; vol = vol->v_next ) {
* the afpd processes would come closer)
* [RS] */
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "setvoltime(%s): gettimeofday: %s", vol->v_path, strerror(errno) );
return;
}
/*
- * $Id: config.c,v 1.18 2009-10-14 01:38:28 didg Exp $
+ * $Id: config.c,v 1.19 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return -1;
}
- if (( stop = strchr( nrange, '-' )) != 0 ) {
+ if (( stop = strchr( nrange, '-' )) != NULL ) {
stop++;
}
net = atoi( nrange );
}
if ( iface->i_flags & IFACE_PHASE1 ) {
- if ( stop != 0 ) {
+ if ( stop != NULL ) {
fprintf( stderr, "Phase 1 doesn't use an address range.\n" );
return -1;
}
iface->i_rt->rt_firstnet = iface->i_rt->rt_lastnet = htons( net );
} else if ( iface->i_flags & IFACE_PHASE2 ) {
iface->i_rt->rt_firstnet = htons( net );
- if ( stop != 0 ) {
+ if ( stop != NULL ) {
net = atoi( stop );
if ( net < 0 || net >= 0xffff ) {
fprintf( stderr, "Bad network: %d\n", net );
/*
- * $Id: main.c,v 1.21 2009-10-14 01:38:28 didg Exp $
+ * $Id: main.c,v 1.22 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
while ( rtmp ) {
frtmp = rtmp->rt_next;
if ( rtmp->rt_hops == RTMPHOPS_POISON ||
- rtmp->rt_iprev == 0 ) {
+ rtmp->rt_iprev == NULL ) {
rtmp_free( rtmp );
} else {
rtmp->rt_hops = RTMPHOPS_POISON;
}
rtmp = frtmp;
}
- if ( gate->g_rt == 0 ) {
- if ( gate->g_prev == 0 ) {
+ if ( gate->g_rt == NULL ) {
+ if ( gate->g_prev == NULL ) {
gate->g_iface->i_gate = gate->g_next;
} else {
gate->g_prev->g_next = gate->g_next;
}
- if ( gate->g_next != 0 ) {
+ if ( gate->g_next != NULL ) {
gate->g_next->g_prev = gate->g_prev;
}
fgate = gate; /* can't free here, just mark it */
* if we're not a seed router.
*/
- if ( gate->g_iface->i_gate == 0 &&
+ if ( gate->g_iface->i_gate == NULL &&
((iface->i_flags & IFACE_SEED) == 0)) {
gate->g_iface->i_flags |= IFACE_NOROUTER;
gate->g_iface->i_flags &= ~IFACE_CONFIG;
*/
if ( rtmp->rt_state >= RTMPTAB_BAD ) {
frtmp = rtmp->rt_next;
- if ( rtmp->rt_iprev == 0 ) { /* not in use */
+ if ( rtmp->rt_iprev == NULL ) { /* not in use */
rtmp_free( rtmp );
} else { /* in use */
if ( rtmp->rt_hops == RTMPHOPS_POISON ) {
*/
for ( rtmp = iface2->i_rt; rtmp; rtmp = rtmp->rt_inext ) {
/* don't broadcast routes we have no zone for */
- if ( rtmp->rt_zt == 0 ||
+ if ( rtmp->rt_zt == NULL ||
( rtmp->rt_flags & RTMPTAB_ZIPQUERY ) ||
( rtmp->rt_flags & RTMPTAB_HASZONES ) == 0 ) {
continue;
*/
void bootaddr(struct interface *iface)
{
- if ( iface == 0 ) {
+ if ( iface == NULL ) {
return;
}
/*
- * $Id: nbp.c,v 1.12 2009-10-13 22:55:37 didg Exp $
+ * $Id: nbp.c,v 1.13 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
if ( interfaces->i_next->i_rt->rt_zt ) {
zt = (struct ziptab *)interfaces->i_next->i_rt->rt_zt->l_data;
} else {
- zt = 0;
+ zt = NULL;
}
} else {
for ( zt = ziptab; zt; zt = zt->zt_next ) {
break;
}
}
- if ( zt == 0 ) {
+ if ( zt == NULL ) {
nbp_ack( ap->ap_fd, NBPOP_ERROR, (int)nh.nh_id, from );
return 0;
}
* Observe that we don't have to do any local-zone verification
* if the zone aleady has a multicast address set.
*/
- if ( zt != 0 && zt->zt_bcast == 0 ) {
+ if ( zt != NULL && zt->zt_bcast == NULL ) {
/*
* Check if zone is associated with any of our local interfaces.
*/
break;
}
}
- if ( l != 0 ) {
+ if ( l != NULL ) {
break;
}
}
- if ( iface == 0 ) {
+ if ( iface == NULL ) {
nbp_ack( ap->ap_fd, NBPOP_ERROR, (int)nh.nh_id, from );
return 0;
}
}
if (( ntab = (struct nbptab *)malloc( sizeof( struct nbptab )))
- == 0 ) {
+ == NULL ) {
LOG(log_error, logtype_atalkd, "nbp_packet: malloc: %s", strerror(errno) );
return -1;
}
memcpy( &ntab->nt_nve, &nn, sizeof( struct nbpnve ));
ntab->nt_iface = ap->ap_iface;
ntab->nt_next = nbptab;
- ntab->nt_prev = 0;
+ ntab->nt_prev = NULL;
if ( nbptab ) {
nbptab->nt_prev = ntab;
}
break;
}
}
- if ( ntab == 0 ) {
+ if ( ntab == NULL ) {
nbp_ack( ap->ap_fd, NBPOP_ERROR, (int)nh.nh_id, from );
return 0;
}
- if ( ntab->nt_next != 0 ) {
+ if ( ntab->nt_next != NULL ) {
ntab->nt_next->nt_prev = ntab->nt_prev;
}
- if ( ntab->nt_prev != 0 ) {
+ if ( ntab->nt_prev != NULL ) {
ntab->nt_prev->nt_next = ntab->nt_next;
}
if ( ntab == nbptab ) {
break;
}
}
- if ( zt == 0 ) {
+ if ( zt == NULL ) {
nbp_ack( ap->ap_fd, NBPOP_ERROR, (int)nh.nh_id, from );
return 0;
}
* If we've got no zones, send out LKUP on the local net.
* Otherwise, look through the zone table.
*/
- if ( zt == 0 ) {
+ if ( zt == NULL ) {
#ifdef BSD4_4
sat.sat_len = sizeof( struct sockaddr_at );
#endif /* BSD4_4 */
break;
}
}
- if ( iface == 0 ) {
+ if ( iface == NULL ) {
return 0;
}
for ( ap = iface->i_ports; ap; ap = ap->ap_next ) {
for ( l = zt->zt_rt; l; l = l->l_next ) {
rtmp = (struct rtmptab *)l->l_data;
- if ( rtmp->rt_gate == 0 ) {
+ if ( rtmp->rt_gate == NULL ) {
for ( iface = interfaces; iface;
iface = iface->i_next ) {
if ( iface->i_rt == rtmp ) {
if ( transition &&
( rtmp->rt_flags & RTMPTAB_EXTENDED ) == 0 ) {
- if ( rtmp->rt_gate == 0 ) {
+ if ( rtmp->rt_gate == NULL ) {
locallkup = 1;
}
nh.nh_op = NBPOP_LKUP;
sat.sat_addr.s_net = rtmp->rt_firstnet;
sat.sat_addr.s_node = ATADDR_BCAST;
} else {
- if ( rtmp->rt_gate == 0 ) {
+ if ( rtmp->rt_gate == NULL ) {
nh.nh_op = NBPOP_LKUP;
memcpy( nbpop, &nh, SZ_NBPHDR );
sat.sat_addr.s_net = 0;
/*
- * $Id: rtmp.c,v 1.15 2009-10-13 22:55:37 didg Exp $
+ * $Id: rtmp.c,v 1.16 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
}
if ( !gate ) { /* new gateway */
- if (( gate = (struct gate *)malloc( sizeof( struct gate ))) == 0 ) {
+ if (( gate = (struct gate *)malloc( sizeof( struct gate ))) == NULL ) {
LOG(log_error, logtype_atalkd, "rtmp_packet: malloc: %s", strerror(errno) );
return -1;
}
gate->g_next = iface->i_gate;
- gate->g_prev = 0;
- gate->g_rt = 0;
+ gate->g_prev = NULL;
+ gate->g_rt = NULL;
gate->g_iface = iface; /* need this? */
gate->g_sat = *from;
if ( iface->i_gate ) {
* we're not likely to be asked for the same tuple twice
* in a row.
*/
- if ( rtmp->rt_next != 0 ) {
+ if ( rtmp->rt_next != NULL ) {
gate->g_rt->rt_prev->rt_next = gate->g_rt;
gate->g_rt = rtmp->rt_next;
- rtmp->rt_next = 0;
+ rtmp->rt_next = NULL;
}
} else if (( rt.rt_dist & 0x7f ) + 1 > RTMPHOPS_MAX ) {
LOG(log_info, logtype_atalkd, "rtmp_packet bad hop count from %u.%u for %u",
/*
* Add rtmptab entry to end of list (leave head alone).
*/
- if ( gate->g_rt == 0 ) {
+ if ( gate->g_rt == NULL ) {
rtmp->rt_prev = rtmp;
gate->g_rt = rtmp;
} else {
* Request and RDR.
*/
if (((iface->i_flags & IFACE_ISROUTER) == 0) ||
- iface->i_rt->rt_zt == 0 ||
+ iface->i_rt->rt_zt == NULL ||
( iface->i_flags & IFACE_CONFIG ) == 0 ) {
return 0;
}
break;
}
}
- if ( ap == 0 ) {
+ if ( ap == NULL ) {
LOG(log_error, logtype_atalkd, "rtmp_request can't find rtmp socket!" );
return -1;
}
{
struct rtmptab *rtmp;
- if (( rtmp = (struct rtmptab *)calloc(1, sizeof(struct rtmptab))) == 0 ) {
- return( 0 );
+ if (( rtmp = (struct rtmptab *)calloc(1, sizeof(struct rtmptab))) == NULL ) {
+ return( NULL );
}
rtmp->rt_iface = iface;
/*
- * $Id: zip.c,v 1.13 2009-10-13 22:55:37 didg Exp $
+ * $Id: zip.c,v 1.14 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
break;
}
}
- if ( l == 0 ) {
+ if ( l == NULL ) {
LOG(log_error, logtype_atalkd, "zonecheck: %.*s not in zone list", czt->zt_len,
czt->zt_name );
return( -1 ); /* configured zone not found in net zones */
break;
}
}
- if ( rtmp == 0 ) {
+ if ( rtmp == NULL ) {
continue;
}
/*
* Update head to this rtmp entry.
*/
- if ( rtmp != 0 && gate->g_rt != rtmp ) {
+ if ( rtmp != NULL && gate->g_rt != rtmp ) {
gate->g_rt->rt_prev->rt_next = gate->g_rt;
gate->g_rt = rtmp;
- rtmp->rt_prev->rt_next = 0;
+ rtmp->rt_prev->rt_next = NULL;
}
}
* We won't find any rtmp entry if the gateway is no longer
* telling us about the entry.
*/
- if ( rtmp == 0 ) {
+ if ( rtmp == NULL ) {
LOG(log_info, logtype_atalkd, "zip skip reply %u from %u.%u (no rtmp)",
ntohs( firstnet ), ntohs( from->sat_addr.s_net ),
from->sat_addr.s_node );
if ( rtmp && rtmp->rt_flags & RTMPTAB_HASZONES ) {
/* XXX */
- if ( rtmp->rt_gate == 0 &&
+ if ( rtmp->rt_gate == NULL &&
zonecheck( rtmp, gate->g_iface ) != 0 ) {
LOG(log_error, logtype_atalkd, "zip_packet seed zonelist mismatch" );
return -1;
from->sat_addr.s_node );
return 1;
}
- if ( rtmp->rt_iprev == 0 ) {
+ if ( rtmp->rt_iprev == NULL ) {
LOG(log_info, logtype_atalkd,
"zip ereply %u-%u from %u.%u (rtmp not in use)",
ntohs( rtmp->rt_firstnet ),
}
/* update head to *next* rtmp entry */
- if ( rtmp->rt_next != 0 ) {
+ if ( rtmp->rt_next != NULL ) {
gate->g_rt->rt_prev->rt_next = gate->g_rt;
gate->g_rt = rtmp->rt_next;
- rtmp->rt_next = 0;
+ rtmp->rt_next = NULL;
}
}
if ( n == zh.zh_count ) {
rtmp->rt_flags |= RTMPTAB_HASZONES;
/* XXX */
- if ( rtmp->rt_gate == 0 &&
+ if ( rtmp->rt_gate == NULL &&
zonecheck( rtmp, gate->g_iface ) != 0 ) {
LOG(log_error, logtype_atalkd, "zip_packet seed zonelist mismatch" );
return -1;
* Don't answer with bogus information.
*/
if (((iface->i_flags & IFACE_ISROUTER) == 0) ||
- iface->i_rt->rt_zt == 0 ||
+ iface->i_rt->rt_zt == NULL ||
( iface->i_flags & IFACE_CONFIG ) == 0 ) {
return 0;
}
break;
}
}
- if ( l == 0 ) {
+ if ( l == NULL ) {
zt = (struct ziptab *)iface->i_rt->rt_zt->l_data;
zh.zh_flags |= ZIPGNI_INVALID;
}
return 0;
}
- if ( iface->i_rt->rt_zt == 0 ) {
+ if ( iface->i_rt->rt_zt == NULL ) {
return 0;
}
zt = (struct ziptab *)iface->i_rt->rt_zt->l_data;
data += zt->zt_len;
}
- *lastflag = ( zt == 0 ); /* Too clever? */
+ *lastflag = ( zt == NULL ); /* Too clever? */
break;
case ZIPOP_GETLOCALZONES :
data += zt->zt_len;
}
- *lastflag = ( l == 0 );
+ *lastflag = ( l == NULL );
break;
default :
break;
}
}
- if ( ap == 0 ) {
+ if ( ap == NULL ) {
LOG(log_error, logtype_atalkd, "zip_getnetinfo can't find zip socket!" );
return -1;
}
/*
- * $Id: file.c,v 1.11 2009-10-13 22:55:37 didg Exp $
+ * $Id: file.c,v 1.12 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
nsize = (( pf->pf_bufsize + len ) / PF_MORESPACE +
(( pf->pf_bufsize + len ) % PF_MORESPACE != 0 )) * PF_MORESPACE;
if ( pf->pf_buf ) {
- if (( nbuf = (char *)realloc( pf->pf_buf, nsize )) == 0 ) {
+ if (( nbuf = (char *)realloc( pf->pf_buf, nsize )) == NULL ) {
exit( 1 );
}
} else {
- if (( nbuf = (char *)malloc( nsize )) == 0 ) {
+ if (( nbuf = (char *)malloc( nsize )) == NULL ) {
exit( 1 );
}
}
/*
- * $Id: main.c,v 1.28 2009-10-14 01:38:28 didg Exp $
+ * $Id: main.c,v 1.29 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int status;
int pid;
- while (( pid = wait3( &status, WNOHANG, 0 )) > 0 ) {
+ while (( pid = wait3( &status, WNOHANG, NULL )) > 0 ) {
if ( WIFEXITED( status )) {
if ( WEXITSTATUS( status )) {
LOG(log_error, logtype_papd, "child %d exited with %d", pid,
perror( "gethostname" );
exit( 1 );
}
- if (( p = strchr( hostname, '.' )) != 0 ) {
+ if (( p = strchr( hostname, '.' )) != NULL ) {
*p = '\0';
}
if (( defprinter.p_name = (char *)malloc( strlen( hostname ) + 1 ))
sv.sa_handler = die;
sigemptyset( &sv.sa_mask );
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGTERM, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGTERM, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_papd, "sigaction: %s", strerror(errno) );
papd_exit( 1 );
}
sv.sa_handler = reap;
sigemptyset( &sv.sa_mask );
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGCHLD, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGCHLD, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_papd, "sigaction: %s", strerror(errno) );
papd_exit( 1 );
}
for ( pr = printers; pr; pr = pr->p_next ) {
FD_SET( atp_fileno( pr->p_atp ), &fdset );
}
- if (( c = select( FD_SETSIZE, &fdset, 0, 0, 0 )) < 0 ) {
+ if (( c = select( FD_SETSIZE, &fdset, NULL, NULL, NULL )) < 0 ) {
if ( errno == EINTR ) {
continue;
}
sv.sa_handler = SIG_DFL;
sigemptyset( &sv.sa_mask );
sv.sa_flags = SA_RESTART;
- if ( sigaction( SIGTERM, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGTERM, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_papd, "sigaction: %s", strerror(errno) );
exit( 1 );
}
- if ( sigaction( SIGCHLD, &sv, 0 ) < 0 ) {
+ if ( sigaction( SIGCHLD, &sv, NULL ) < 0 ) {
LOG(log_error, logtype_papd, "sigaction: %s", strerror(errno) );
exit( 1 );
}
/*
- * $Id: ppd.c,v 1.16 2009-10-13 22:55:37 didg Exp $
+ * $Id: ppd.c,v 1.17 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct ppd_font *ppd_fonts = NULL;
struct ppd_feature ppd_features[] = {
- { "*LanguageLevel", 0 },
- { "*PSVersion", 0 },
+ { "*LanguageLevel", NULL },
+ { "*PSVersion", NULL },
#ifdef HAVE_CUPS
{ "*FreeVM", "33554432" },
#else
- { "*FreeVM", 0 },
+ { "*FreeVM", NULL },
#endif
- { "*Product", 0 },
- { "*PCFileName", 0 },
- { "*ModelName", 0 },
- { "*NickName", 0 },
- { "*ColorDevice", 0 },
- { "*FaxSupport", 0 },
- { "*TTRasterizer", 0 },
- { 0, 0 },
+ { "*Product", NULL },
+ { "*PCFileName", NULL },
+ { "*ModelName", NULL },
+ { "*NickName", NULL },
+ { "*ColorDevice", NULL },
+ { "*FaxSupport", NULL },
+ { "*TTRasterizer", NULL },
+ { NULL, NULL },
};
struct ppdent {
/*
- * $Id: printcap.c,v 1.11 2009-10-13 22:55:37 didg Exp $
+ * $Id: printcap.c,v 1.12 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
for (;;) {
bp = tskip(bp);
if (!*bp)
- return (0);
+ return (NULL);
if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1])
continue;
if (*bp == '@')
- return(0);
+ return(NULL);
if (*bp != '=')
continue;
bp++;
/*
- * $Id: session.c,v 1.18 2009-10-14 01:38:28 didg Exp $
+ * $Id: session.c,v 1.19 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
infile.pf_state = PF_BOT;
infile.pf_bufsize = 0;
infile.pf_datalen = 0;
- infile.pf_buf = 0;
- infile.pf_data = 0;
+ infile.pf_buf = NULL;
+ infile.pf_data = NULL;
outfile.pf_state = PF_BOT;
outfile.pf_bufsize = 0;
outfile.pf_datalen = 0;
- outfile.pf_buf = 0;
- outfile.pf_data = 0;
+ outfile.pf_buf = NULL;
+ outfile.pf_data = NULL;
/*
* Ask for data.
FD_SET( atp_fileno( atp ), &fds );
do { /* do list until success or an unrecoverable error occurs */
- if (( cc = select( FD_SETSIZE, &fds, 0, 0, &tv )) < 0 )
+ if (( cc = select( FD_SETSIZE, &fds, NULL, NULL, &tv )) < 0 )
LOG(log_error, logtype_papd, "select: %s", strerror(errno) ); /* log all errors */
} while (( cc < 0 ) && (errno == 4));
/*
- * $Id: psf.c,v 1.11 2009-10-14 01:38:28 didg Exp $
+ * $Id: psf.c,v 1.12 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int textps();
static char psapath[] = _PATH_PSA;
-static char *psaargv[] = { "psa", 0, 0, 0, 0 };
+static char *psaargv[] = { "psa", NULL, NULL, NULL, NULL };
/*
* If we're not doing accounting, we just call pap as below.
* in arg 3, and 0 in arg 4.
*/
static char pappath[] = _PATH_PAP;
-static char *papargv[] = { "pap", "-sstatus", 0, 0, 0, 0, 0, 0 };
+static char *papargv[] = { "pap", "-sstatus", NULL, NULL, NULL, NULL, NULL, NULL };
static char revpath[] = _PATH_PSORDER;
-static char *revargv[] = { "psorder", "-d", 0 };
+static char *revargv[] = { "psorder", "-d", NULL };
-static char *filtargv[] = { 0, 0, 0 };
+static char *filtargv[] = { NULL, NULL, NULL };
static char inbuf[ 1024 * 8 ];
static int inlen;
papargv[ 4 ] = "-E";
papargv[ 5 ] = _PATH_PAGECOUNT;
papargv[ 6 ] = "-";
- papargv[ 7 ] = 0;
+ papargv[ 7 ] = NULL;
} else if ( waitidle ) {
papargv[ 2 ] = "-w";
papargv[ 3 ] = "-c";
papargv[ 4 ] = "-E";
papargv[ 5 ] = _PATH_PAGECOUNT;
papargv[ 6 ] = "-";
- papargv[ 7 ] = 0;
+ papargv[ 7 ] = NULL;
} else {
papargv[ 2 ] = "-c";
papargv[ 3 ] = "-E";
papargv[ 4 ] = _PATH_PAGECOUNT;
papargv[ 5 ] = "-";
- papargv[ 6 ] = 0;
+ papargv[ 6 ] = NULL;
}
} else {
/*
papargv[ 3 ] = _PATH_PAGECOUNT;
papargv[ 4 ] = "-";
papargv[ 5 ] = _PATH_PAGECOUNT;
- papargv[ 6 ] = 0;
+ papargv[ 6 ] = NULL;
}
#endif /* FUCKED */
} else {
papargv[ 2 ] = "-c";
papargv[ 3 ] = "-E";
- papargv[ 4 ] = 0;
+ papargv[ 4 ] = NULL;
}
if (( c = pexecv( pappath, papargv )) < 0 ) {
if ( waitidle2 ) {
papargv[ 3 ] = "-W";
papargv[ 4 ] = _PATH_PAGECOUNT;
- papargv[ 5 ] = 0;
+ papargv[ 5 ] = NULL;
} else if ( waitidle ) {
papargv[ 3 ] = "-w";
papargv[ 4 ] = _PATH_PAGECOUNT;
- papargv[ 5 ] = 0;
+ papargv[ 5 ] = NULL;
} else {
papargv[ 3 ] = _PATH_PAGECOUNT;
- papargv[ 4 ] = 0;
+ papargv[ 4 ] = NULL;
}
if (( c = pexecv( pappath, papargv )) < 0 ) {
close( 1 );
}
while ( children ) {
- if (( c = wait3( &status, 0, 0 )) < 0 ) {
+ if (( c = wait3( &status, 0, NULL )) < 0 ) {
syslog( LOG_ERR, "wait3: %s", strerror(errno) );
exit( 1 );
}
/*
- * $Id: nbp_rgstr.c,v 1.5 2009-10-13 22:55:37 didg Exp $
+ * $Id: nbp_rgstr.c,v 1.6 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
FD_SET( s, &readfd );
timeout.tv_sec = 2;
timeout.tv_usec = 0;
- if (( cc = select( s + 1, &readfd, 0, 0, &timeout )) < 0 ) {
+ if (( cc = select( s + 1, &readfd, NULL, NULL, &timeout )) < 0 ) {
goto register_err;
}
if ( cc == 0 ) {
/*
- * $Id: nbp_unrgstr.c,v 1.5 2009-10-13 22:55:37 didg Exp $
+ * $Id: nbp_unrgstr.c,v 1.6 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1997 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
FD_SET( s, &readfd );
timeout.tv_sec = 2;
timeout.tv_usec = 0;
- if (( cc = select( s + 1, &readfd, 0, 0, &timeout )) < 0 ) {
+ if (( cc = select( s + 1, &readfd, NULL, NULL, &timeout )) < 0 ) {
goto unregister_err;
}
if ( cc == 0 ) {
{ { 0xf880, 0xf88f }, mac_chinese_simp_uni2_pagef8 },
{ { 0xfe30, 0xfe4f }, mac_chinese_simp_uni2_pagefe },
{ { 0xff50, 0xffef }, mac_chinese_simp_uni2_pageff },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_chinese_simp_uni2_charset[] = {
{ { 0xa3a0, 0xa3ff }, mac_chinese_simp_2uni_pagea3 },
{ { 0xa6d0, 0xa6ff }, mac_chinese_simp_2uni_pagea6 },
{ { 0xa8b0, 0xa8cf }, mac_chinese_simp_2uni_pagea8 },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_chinese_simp_2uni_charset[] = {
{ { 0xf880, 0xf88f }, mac_chinese_trad_uni2_pagef8 },
{ { 0xfe40, 0xfe5f }, mac_chinese_trad_uni2_pagefe },
{ { 0xff60, 0xff6f }, mac_chinese_trad_uni2_pageff },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_chinese_trad_uni2_charset[] = {
static const cjk_index_t mac_chinese_trad_2uni_index[] = {
{ { 0x0080, 0x00ff }, mac_chinese_trad_2uni_page00 },
{ { 0xa140, 0xa2cf }, mac_chinese_trad_2uni_pagea1 },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_chinese_trad_2uni_charset[] = {
{ { 0x3220, 0x33df }, mac_japanese_uni2_page32 },
{ { 0xe000, 0xe04f }, mac_japanese_uni2_pagee0 },
{ { 0xfe30, 0xff3f }, mac_japanese_uni2_pagefe },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_japanese_uni2_charset[] = {
{ { 0x8150, 0x815f }, mac_japanese_2uni_page81 },
{ { 0x8540, 0x886f }, mac_japanese_2uni_page85 },
{ { 0xeb40, 0xed9f }, mac_japanese_2uni_pageeb },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_japanese_2uni_charset[] = {
{ { 0xe000, 0xe41f }, mac_korean_uni2_pagee0 },
{ { 0xf800, 0xf84f }, mac_korean_uni2_pagef8 },
{ { 0xfe50, 0xffef }, mac_korean_uni2_pagefe },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_korean_uni2_charset[] = {
static const cjk_index_t mac_korean_2uni_index[] = {
{ { 0x0080, 0x00ff }, mac_korean_2uni_page00 },
{ { 0xa140, 0xadbf }, mac_korean_2uni_pagea1 },
- { { 0, 0 }, 0 }
+ { { 0, 0 }, NULL }
};
static const u_int16_t mac_korean_2uni_charset[] = {
/*
- * $Id: server_child.c,v 1.10 2008-12-03 18:35:44 didg Exp $
+ * $Id: server_child.c,v 1.11 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
sv.sa_handler = SIG_DFL;
sigemptyset( &sv.sa_mask );
- sigaction(SIGALRM, &sv, 0 );
- sigaction(SIGHUP, &sv, 0 );
- sigaction(SIGTERM, &sv, 0 );
- sigaction(SIGUSR1, &sv, 0 );
- sigaction(SIGCHLD, &sv, 0 );
+ sigaction(SIGALRM, &sv, NULL );
+ sigaction(SIGHUP, &sv, NULL );
+ sigaction(SIGTERM, &sv, NULL );
+ sigaction(SIGUSR1, &sv, NULL );
+ sigaction(SIGCHLD, &sv, NULL );
sigemptyset(&sigs);
sigaddset(&sigs, SIGALRM);