diff options
author | Dave Beckett <dave@dajobe.org> | 2017-01-08 21:02:37 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2017-01-08 21:02:37 -0800 |
commit | 9309f2702f5e7f3a20b370638fd9a7a8f3a02b58 (patch) | |
tree | 9e10121b6c2b124fedd53d749561626540c9e4b4 | |
parent | b6f3971fcb6e3b52e0899fdc60441bb9d8694878 (diff) | |
download | raptor-9309f2702f5e7f3a20b370638fd9a7a8f3a02b58.tar.gz |
[c++] Test pointer against NULL rather than use as implicit bool
-rw-r--r-- | src/snprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/snprintf.c b/src/snprintf.c index dfd1b35d..de8ecbf8 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -86,7 +86,7 @@ vsnprintf_is_c99(void) #define VSNPRINTF_NOT_C99_BLOCK(len, buffer, size, format, arguments) \ do { \ - if(!buffer || !size) { \ + if((buffer == NULL) || !size) { \ /* This vsnprintf doesn't return number of bytes required */ \ size = 2 + strlen(format); \ while(1) { \ @@ -123,7 +123,7 @@ vsnprintf_is_c99(void) } \ } \ \ - if(buffer) \ + if(buffer != NULL) \ len = vsnprintf(buffer, size, format, arguments); \ } while(0) |