From: Rusty Russell Date: Tue, 27 Sep 2011 04:55:59 +0000 (+0930) Subject: tap: fix exit status when we have exactly 256 errors. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=cbca0212706dfc855085aa18feb7a4efcc779901 tap: fix exit status when we have exactly 256 errors. --- 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; +}