summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-14 22:40:54 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-14 22:40:54 -0400
commit014a49e4aee821ca3490f318ce6d875942f4018f (patch)
treef0b4f85e8e89be7e17f0704f64d42869cfb30d29 /src/stdio
parente7dae48d2c09a9952328478164743e8b0be9baff (diff)
clean up warnings
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/putc_unlocked.c5
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 */