diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-14 22:40:54 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-14 22:40:54 -0400 |
| commit | 014a49e4aee821ca3490f318ce6d875942f4018f (patch) | |
| tree | f0b4f85e8e89be7e17f0704f64d42869cfb30d29 /src/stdio | |
| parent | e7dae48d2c09a9952328478164743e8b0be9baff (diff) | |
clean up warnings
Diffstat (limited to 'src/stdio')
| -rw-r--r-- | src/stdio/putc_unlocked.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stdio/putc_unlocked.c b/src/stdio/putc_unlocked.c index 8741b3c1..61ad6b03 100644 --- a/src/stdio/putc_unlocked.c +++ b/src/stdio/putc_unlocked.c @@ -1,5 +1,6 @@ #include <stdio.h> #include "_stdio.h" +#include "_assert.h" #if defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || defined _XOPEN_SOURCE #include "sys/types.h" @@ -14,9 +15,7 @@ int putc_unlocked(int c, FILE *stream) { unsigned char ch = (unsigned char)c; - if (!stream) { - return EOF; - } + ASSERT_NONNULL(stream); if (write(stream->fd, &ch, sizeof(ch)) != 1) { /* error */ |
