snprintf: fix warning about non null argument
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 19 Feb 2010 22:27:29 +0000 (17:27 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 19 Feb 2010 22:27:29 +0000 (17:27 -0500)
snprintf/wcio.h

index 1b41ec971d2f2fe9fb58de5f2b894993ed60ac7b..0c955e5c8eefac7e311f895bed05636d6e664373 100644 (file)
@@ -48,6 +48,9 @@ struct wchar_io_data {
 #define WCIO_GET(fp) \
        (_EXT(fp) ? &(_EXT(fp)->_wcio) : (struct wchar_io_data *)0)
 
+#define WCIO_GET_NONULL(fp) \
+       (&(_EXT(fp)->_wcio))
+
 #define _SET_ORIENTATION(fp, mode) \
 do {\
        struct wchar_io_data *_wcio = WCIO_GET(fp); \
@@ -76,6 +79,6 @@ do {\
 } while (0)
 
 #define WCIO_INIT(fp) \
-       memset(WCIO_GET(fp), 0, sizeof(struct wchar_io_data))
+       memset(WCIO_GET_NONULL(fp), 0, sizeof(struct wchar_io_data))
 
 #endif /*_WCIO_H_*/
This page took 0.023527 seconds and 4 git commands to generate.