aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/local.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 24eaff3..b34c7c9 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -197,7 +197,8 @@ extern _READ_WRITE_RETURN_TYPE __swrite64 (struct _reent *, void *,
do \
{ \
struct _reent *_check_init_ptr = (ptr); \
- if ((_check_init_ptr) && !_REENT_CLEANUP(_check_init_ptr))\
+ if (!_REENT_IS_NULL(_check_init_ptr) && \
+ !_REENT_CLEANUP(_check_init_ptr)) \
__sinit (_check_init_ptr); \
} \
while (0)