regress: Support NULL fdset arguments to select
[adns] / regress / hcommon.c.m4
index 330da4d..760ca0c 100644 (file)
@@ -160,6 +160,11 @@ void Tvbfdset(int max, const fd_set *fds) {
   int i;
   const char *comma= "";
   
+  if (!fds) {
+    Tvba("null");
+    return;
+  }
+
   Tvba("[");
   for (i=0; i<max; i++) {
     if (!FD_ISSET(i,fds)) continue;