From cbca0212706dfc855085aa18feb7a4efcc779901 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 27 Sep 2011 14:25:59 +0930 Subject: [PATCH] tap: fix exit status when we have exactly 256 errors. --- ccan/tap/tap.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index 7c01e140..bf8a276c 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -418,8 +418,8 @@ todo_end(void) UNLOCK; } -int -exit_status(void) +static int +exit_status_(void) { int r; @@ -446,3 +446,12 @@ exit_status(void) return r; } + +int +exit_status(void) +{ + int r = exit_status_(); + if (r > 255) + r = 255; + return r; +} -- 2.39.2