Add "do { } while (0)" to macros used to remove logging calls, to ensure there's no code structure change when enabling/disabling logging.
Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com> --- lib/vhost/vhost_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index 7caf6d9afa..b5679380f5 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -33,7 +33,7 @@ RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); RTE_LOG_LINE_PREFIX(DEBUG, VHOST_CRYPTO, "%s() line %u: ", \ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #else -#define VC_LOG_DBG(...) +#define VC_LOG_DBG(...) do { } while (0) #endif #define VIRTIO_CRYPTO_FEATURES ((1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \ -- 2.47.0.vfs.0.3