]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Start using 'design by contract' assertions
authorHarlan Stenn <stenn@ntp.org>
Fri, 22 Jun 2007 05:17:17 +0000 (01:17 -0400)
committerHarlan Stenn <stenn@ntp.org>
Fri, 22 Jun 2007 05:17:17 +0000 (01:17 -0400)
bk: 467b5b5dUszao4kht_4V8k3tPibIWQ

ntpd/ntp_io.c

index f4d5db7a85f972017312c26ba7c22595c86789e5..55e132f7b2cc7ba7b7063627e88271663250b799 100644 (file)
@@ -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;