chiark / gitweb /
regress: Support NULL fdset arguments to select
[adns.git] / regress / hplayback.c.m4
index 112475d8201ad95c5de3fa16dc16679de2e1363a..792952f02046e741b3b96e3012c13ba71bc99ac8 100644 (file)
@@ -3,7 +3,8 @@ m4_dnl (part of complex test harness, not of the library)
 m4_dnl - playback routines
 
 m4_dnl  This file is part of adns, which is
-m4_dnl    Copyright (C) 1997-2000,2003,2006  Ian Jackson
+m4_dnl    Copyright (C) 1997-2000,2003,2006,2014  Ian Jackson
+m4_dnl    Copyright (C) 2014  Mark Wooding
 m4_dnl    Copyright (C) 1999-2000,2003,2006  Tony Finch
 m4_dnl    Copyright (C) 1991 Massachusetts Institute of Technology
 m4_dnl  (See the file INSTALL for full details.)
@@ -149,6 +150,11 @@ static void P_updatetime(void) {
 static void Pfdset(fd_set *set, int max) {
   int r, c;
   char *ep;
+
+  if (!set) {
+    Pstring("null","null fdset pointer");
+    return;
+  }
   
   if (vb2.buf[vb2.used++] != hm_squote[hm_squote) Psyntax("fd set start not [");
   FD_ZERO(set);