From 1c3adceccab907fd7cd7e1fce105e5889767dbb4 Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Sun, 22 Oct 2023 09:41:20 +0200 Subject: [PATCH] fix: use ifdef for NNG_TEST_LIB In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined. --- src/sp/protocol/pair1/pair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sp/protocol/pair1/pair.c b/src/sp/protocol/pair1/pair.c index e98e1ed91..401d70d59 100644 --- a/src/sp/protocol/pair1/pair.c +++ b/src/sp/protocol/pair1/pair.c @@ -498,7 +498,7 @@ pair1_pipe_send(pair1_pipe *p, nni_msg *m) // assumption: we have unique access to the message at this point. NNI_ASSERT(!nni_msg_shared(m)); -#if NNG_TEST_LIB +#ifdef NNG_TEST_LIB if (s->inject_header) { goto inject; } @@ -506,7 +506,7 @@ pair1_pipe_send(pair1_pipe *p, nni_msg *m) NNI_ASSERT(nni_msg_header_len(m) == sizeof(uint32_t)); nni_msg_header_poke_u32(m, nni_msg_header_peek_u32(m) + 1); -#if NNG_TEST_LIB +#ifdef NNG_TEST_LIB inject: #endif @@ -531,7 +531,7 @@ pair1_sock_send(void *arg, nni_aio *aio) return; } -#if NNG_TEST_LIB +#ifdef NNG_TEST_LIB if (s->inject_header) { goto inject; } @@ -554,7 +554,7 @@ pair1_sock_send(void *arg, nni_aio *aio) nni_msg_header_append_u32(m, 0); } -#if NNG_TEST_LIB +#ifdef NNG_TEST_LIB inject: #endif