From 47b9db5941ba11277d7bd62060057202236fb921 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 28 Jan 2015 23:49:19 +0000 Subject: [PATCH] regress: Support NULL fdset arguments to select We are going to want to pass these, and currently the test harness will dereference the NULL. So fix this. Signed-off-by: Ian Jackson --- regress/hcommon.c | 4 ++++ regress/hcommon.c.m4 | 5 +++++ regress/hplayback.c | 4 ++++ regress/hplayback.c.m4 | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/regress/hcommon.c b/regress/hcommon.c index e63a8cd..301fb2f 100644 --- a/regress/hcommon.c +++ b/regress/hcommon.c @@ -167,6 +167,10 @@ void Tvbbytes(const void *buf, int len) { void Tvbfdset(int max, const fd_set *fds) { int i; const char *comma= ""; + if (!fds) { + Tvba("null"); + return; + } Tvba("["); for (i=0; i