summaryrefslogtreecommitdiff
path: root/tests/tap/process.c
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2016-01-17 19:43:10 -0800
committerRuss Allbery <eagle@eyrie.org>2016-01-17 19:43:10 -0800
commit4b3f858ef567c0d12511e7fea2a56f08f2729635 (patch)
treee1cad1c445669045b47264c8957878352c7adc03 /tests/tap/process.c
parent7856dc7cc5e16140c0084474fe54338f293bf77e (diff)
parent76f93739a8a933d98b87db9496861dae7de0ae1a (diff)
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'tests/tap/process.c')
-rw-r--r--tests/tap/process.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/tap/process.c b/tests/tap/process.c
index 6461fb4..8c22324 100644
--- a/tests/tap/process.c
+++ b/tests/tap/process.c
@@ -47,8 +47,11 @@
# include <sys/select.h>
#endif
#include <sys/stat.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#include <sys/wait.h>
+#include <time.h>
#include <tests/tap/basic.h>
#include <tests/tap/process.h>
@@ -229,6 +232,10 @@ process_free(struct process *process)
{
struct process **prev;
+ /* Do nothing if called with a NULL argument. */
+ if (process == NULL)
+ return;
+
/* Remove the process from the global list. */
prev = &processes;
while (*prev != NULL && *prev != process)