From: Harlan Stenn Date: Fri, 22 Jun 2007 05:17:17 +0000 (-0400) Subject: Start using 'design by contract' assertions X-Git-Tag: NTP_4_2_5P54~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6782c749471903b7844fa5f55d7259aef32105;p=thirdparty%2Fntp.git Start using 'design by contract' assertions bk: 467b5b5dUszao4kht_4V8k3tPibIWQ --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index f4d5db7a8..55e132f7b 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -16,6 +16,7 @@ #include "ntp_request.h" #include "ntp.h" #include "ntp_unixtime.h" +#include "ntp_assert.h" /* Don't include ISC's version of IPv6 variables and structures */ #define ISC_IPV6_H 1 @@ -3619,6 +3620,8 @@ kill_asyncio(int startfd) static void add_fd_to_list(SOCKET fd, enum desc_type type) { vsock_t *lsock = (vsock_t *)malloc(sizeof(vsock_t)); + + NTP_INSIST(lsock != NULL); lsock->fd = fd; lsock->type = type;