rwrap: Move NEXT_KEY out of the NDEBUG ifdef.
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 21 Oct 2014 12:43:48 +0000 (14:43 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 21 Oct 2014 12:43:48 +0000 (14:43 +0200)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/resolv_wrapper.c

index dab26b3..8cc1e04 100644 (file)
@@ -74,23 +74,11 @@ enum rwrap_dbglvl_e {
 
 #ifdef NDEBUG
 # define RWRAP_LOG(...)
-#else
+#else /* NDEBUG */
 
 static void rwrap_log(enum rwrap_dbglvl_e dbglvl, const char *func, const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
 # define RWRAP_LOG(dbglvl, ...) rwrap_log((dbglvl), __func__, __VA_ARGS__)
 
-#define NEXT_KEY(buf, key) do {                                        \
-       (key) = (buf) ? strpbrk((buf), " \t") : NULL;           \
-       if ((key) != NULL) {                                    \
-               (key)[0] = '\0';                                \
-               (key)++;                                        \
-       }                                                       \
-       while ((key) != NULL                                    \
-              && (isblank((int)(key)[0]))) {                   \
-               (key)++;                                        \
-       }                                                       \
-} while(0);
-
 static void rwrap_log(enum rwrap_dbglvl_e dbglvl,
                      const char *func,
                      const char *format, ...)
@@ -137,6 +125,18 @@ static void rwrap_log(enum rwrap_dbglvl_e dbglvl,
 }
 #endif /* NDEBUG RWRAP_LOG */
 
+#define NEXT_KEY(buf, key) do {                                        \
+       (key) = (buf) ? strpbrk((buf), " \t") : NULL;           \
+       if ((key) != NULL) {                                    \
+               (key)[0] = '\0';                                \
+               (key)++;                                        \
+       }                                                       \
+       while ((key) != NULL                                    \
+              && (isblank((int)(key)[0]))) {                   \
+               (key)++;                                        \
+       }                                                       \
+} while(0);
+
 
 /* Prepares a fake header with a single response. Advances header_blob */
 static ssize_t rwrap_fake_header(uint8_t **header_blob, size_t remaining,