From a636f8897ac64a3dbe2d64f77ef3cef67419e41c Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 14 Apr 2021 18:40:12 +0100 Subject: [PATCH] Work around warning on tag build due to && logic. Signed-off-by: Adam Warner --- src/log.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/log.c b/src/log.c index 66883d6d..406948af 100644 --- a/src/log.c +++ b/src/log.c @@ -290,10 +290,14 @@ const char __attribute__ ((malloc)) *get_FTL_version(void) // Obtain FTL version if not already determined if(FTLversion == NULL) { - if(strlen(GIT_TAG) > 1 && strlen(GIT_VERSION) > 1) + if(strlen(GIT_TAG) > 1 ) { - // Copy version string if this is a tagged release - FTLversion = strdup(GIT_VERSION); + if (strlen(GIT_VERSION) > 1) + { + // Copy version string if this is a tagged release + FTLversion = strdup(GIT_VERSION); + } + } else if(strlen(GIT_HASH) > 0) {