chiark / gitweb /
regress: Support NULL fdset arguments to select
[adns.git] / regress / hplayback.c.m4
index 2f961f749a52609e782966ed5c344ff0ae375fc2..792952f02046e741b3b96e3012c13ba71bc99ac8 100644 (file)
@@ -4,6 +4,7 @@ m4_dnl - playback routines
 
 m4_dnl  This file is part of adns, which is
 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);