chiark / gitweb /
regress: Support NULL fdset arguments to select
[adns.git] / regress / hcommon.c.m4
index 330da4d2e9d27a4dcbebe342b15c7ae2a06ccb7d..760ca0c0bbd4fdd84704b643ab329baa0912b2f8 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;