From a971509182479d57b09f9bff122e8413a2421771 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 6 Apr 2001 07:49:27 +0000 Subject: test for unset in pipestatussetfn() (13917) --- ChangeLog | 2 ++ Src/params.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e90f5b78..da6a6709a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2001-04-06 Sven Wischnowsky + * 13917: Src/params.c: test for unset in pipestatussetfn() + * 13916: Src/params.c: like 13907, but for backward searches 2001-04-05 Felix Rosencrantz diff --git a/Src/params.c b/Src/params.c index 2475f2861..3bca12bd8 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2873,11 +2873,15 @@ pipestatgetfn(Param pm) static void pipestatsetfn(Param pm, char **x) { - int i; + if (x) { + int i; - for (i = 0; *x && i < MAX_PIPESTATS; i++, x++) - pipestats[i] = atoi(*x); - numpipestats = i; + for (i = 0; *x && i < MAX_PIPESTATS; i++, x++) + pipestats[i] = atoi(*x); + numpipestats = i; + } + else + numpipestats = 0; } /**/ -- cgit 1.4.1