From: Frank Kardel Date: Mon, 20 Mar 2006 05:56:32 +0000 (+0000) Subject: refclock_oncore.c, ntp_restrict.c: X-Git-Tag: NTP_4_2_1P10_RC~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e785b95c9603fe53dc790a282e267fa7787ab37;p=thirdparty%2Fntp.git refclock_oncore.c, ntp_restrict.c: standardize pointer checks bk: 441e4410xkDaR6EA2HEtvSbwhWaAdQ --- diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c index 25047f916..378120868 100644 --- a/ntpd/ntp_restrict.c +++ b/ntpd/ntp_restrict.c @@ -361,7 +361,7 @@ hack_restrict( SET_IPV6_ADDR_MASK(&addr6, &GET_INADDR6(*resaddr), &mask6); if (IN6_IS_ADDR_UNSPECIFIED(&addr6)) { - rlprev6 = 0; + rlprev6 = NULL; rl6 = restrictlist6; } else { rlprev6 = restrictlist6; @@ -527,7 +527,7 @@ hack_restrict( rl6->addr6 = addr6; rl6->mask6 = mask6; rl6->mflags = (u_short)mflags; - if (rlprev6) { + if (rlprev6 != NULL) { rl6->next = rlprev6->next; rlprev6->next = rl6; } else { @@ -569,7 +569,7 @@ hack_restrict( if (rl6 != 0 && !IN6_IS_ADDR_UNSPECIFIED(&rl6->addr6) && !(rl6->mflags & RESM_INTERFACE)) { - if (rlprev6) { + if (rlprev6 != NULL) { rlprev6->next = rl6->next; } else { restrictlist6 = rl6->next; diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index dbf624579..e9fd468fc 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -2218,7 +2218,7 @@ oncore_msg_BaEaHa( case 6: smp = &instance->shmem[instance->shmem_Ba]; break; case 8: smp = &instance->shmem[instance->shmem_Ea]; break; case 12: smp = &instance->shmem[instance->shmem_Ha]; break; - default: smp = (u_char) 0; break; + default: smp = (u_char *) NULL; break; } switch (instance->mode) { @@ -2228,7 +2228,7 @@ oncore_msg_BaEaHa( default: i = 0; break; } - if (i && smp) { + if (i && smp != NULL) { i *= (len+6); smp[i + 2]++; memcpy(&smp[i+3], buf, (size_t) (len+3));