for (i = 0 ; i < 6 ; i++, p++)
*p = canonical[*p] ;
}
- slot = 0 ;
+ slot = NULL;
for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){
if (!tb->n) { /* not used */
if (!del && !slot) /* if !del save first free */
{
struct s_smt_tx_queue *queue ;
struct s_smt_fp_txd volatile *t1 ;
- struct s_smt_fp_txd volatile *t2=0 ;
+ struct s_smt_fp_txd volatile *t2 = NULL ;
SMbuf *mb ;
u_long tbctrl ;
int i ;
{
struct smt_para *pa ;
const struct s_p_tab *pt ;
- struct fddi_mib_m *mib_m = 0 ;
- struct fddi_mib_p *mib_p = 0 ;
+ struct fddi_mib_m *mib_m = NULL;
+ struct fddi_mib_p *mib_p = NULL;
int len ;
int plen ;
char *from ;
/*
* check special paras
*/
- swap = 0 ;
+ swap = NULL;
switch (para) {
case SMT_P10F0 :
case SMT_P10F1 :
char c ;
char *mib_addr ;
struct fddi_mib *mib ;
- struct fddi_mib_m *mib_m = 0 ;
- struct fddi_mib_a *mib_a = 0 ;
- struct fddi_mib_p *mib_p = 0 ;
+ struct fddi_mib_m *mib_m = NULL;
+ struct fddi_mib_a *mib_a = NULL;
+ struct fddi_mib_p *mib_p = NULL;
int mac ;
int path ;
int port ;
const struct s_p_tab *pt ;
for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++)
;
- return(pt->p_num ? pt : 0) ;
+ return(pt->p_num ? pt : NULL) ;
}
static int smt_mib_phys(struct s_smc *smc)
char *p ;
int len ;
int plen ;
- void *found = 0 ;
+ void *found = NULL;
SK_UNUSED(smc) ;
len -= plen ;
if (len < 0) {
DB_SMT("SMT : sm_to_para - length error %d\n",plen,0) ;
- return(0) ;
+ return NULL;
}
if ((plen & 3) && (para != SMT_P_ECHODATA)) {
DB_SMT("SMT : sm_to_para - odd length %d\n",plen,0) ;
- return(0) ;
+ return NULL;
}
if (found)
return(found) ;
}
- return(0) ;
+ return NULL;
}
#if 0
*/
/* Attention: don't initialize mib pointer here! */
/* It must be initialized during phase 2 */
- smc->y[port].mib = 0 ;
+ smc->y[port].mib = NULL;
mib->fddiSMTPORTIndexes[port] = port+INDEX_PORT ;
pm->fddiPORTIndex = port+INDEX_PORT ;
{ "SBACOMMAND",16, 0 } ,
{ "SBAAVAILABLE",17, 1, 0, 100 } ,
#endif
- { 0 }
+ { NULL }
} ;
/* Define maximum string size for values and keybuffer */
void smt_timer_init(struct s_smc *smc)
{
- smc->t.st_queue = 0 ;
+ smc->t.st_queue = NULL;
smc->t.st_fast.tm_active = FALSE ;
- smc->t.st_fast.tm_next = 0 ;
+ smc->t.st_fast.tm_next = NULL;
hwt_init(smc) ;
}
timer->tm_active = TRUE ;
if (!smc->t.st_queue) {
smc->t.st_queue = timer ;
- timer->tm_next = 0 ;
+ timer->tm_next = NULL;
timer->tm_delta = time ;
hwt_start(smc,time) ;
return ;
done = 1 ;
}
}
- *last = 0 ;
+ *last = NULL;
next = smc->t.st_queue ;
smc->t.st_queue = tm ;
if (evc->evc_code == code && evc->evc_index == index)
return(evc) ;
}
- return(0) ;
+ return NULL;
}
#define THRESHOLD_2 (2*TICKS_PER_SECOND)