#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
/* zero a structure given a pointer to the structure */
-#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
+#define ZERO_STRUCTP(x) memset((char *)(x), 0, sizeof(*(x))
+
+/* zero a structure given a pointer to the structure */
+#define ZERO_STRUCTPN(x) { if ((x) != NULL) ZERO_STRUCTP(x); }
/* zero an array - note that sizeof(array) must work - ie. it must not be a
pointer */