diff options
Diffstat (limited to 'lib/__fpending.c')
-rw-r--r-- | lib/__fpending.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/__fpending.c b/lib/__fpending.c index 007302c8c..c2405cd63 100644 --- a/lib/__fpending.c +++ b/lib/__fpending.c @@ -21,6 +21,8 @@ # include <config.h> #endif +#include <stdlib.h> + #include "__fpending.h" /* Return the number of pending (aka buffered, unflushed) @@ -28,5 +30,8 @@ size_t __fpending (FILE *fp) { - return PENDING_OUTPUT_N_BYTES; + ptrdiff_t n = PENDING_OUTPUT_N_BYTES; + if (n < 0) + abort (); + return n; } |