From a2eee156b5a85237d9b9ba7896b237ec4f216da0 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 21 Apr 2022 18:23:17 -0400 Subject: [PATCH] Fix instances where STRDEF() was used instead of STR(). In practice this didn't cause problems because the string buffer was still valid and strSize() was not being called. --- src/common/type/string.c | 2 +- test/src/common/harnessLog.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/type/string.c b/src/common/type/string.c index 54cd92a63..c002679e2 100644 --- a/src/common/type/string.c +++ b/src/common/type/string.c @@ -557,7 +557,7 @@ strCmpZ(const String *this, const char *compare) FUNCTION_TEST_PARAM(STRINGZ, compare); FUNCTION_TEST_END(); - FUNCTION_TEST_RETURN(strCmp(this, compare == NULL ? NULL : STRDEF(compare))); + FUNCTION_TEST_RETURN(strCmp(this, compare == NULL ? NULL : STR(compare))); } /**********************************************************************************************************************************/ diff --git a/test/src/common/harnessLog.c b/test/src/common/harnessLog.c index c0230cceb..736d10659 100644 --- a/test/src/common/harnessLog.c +++ b/test/src/common/harnessLog.c @@ -276,9 +276,9 @@ hrnLogReplaceAdd(const char *expression, const char *expressionSub, const char * HarnessLogReplace logReplace = { .expression = strNewZ(expression), - .regExp = regExpNew(STRDEF(expression)), + .regExp = regExpNew(STR(expression)), .expressionSub = expressionSub == NULL ? NULL : strNewZ(expressionSub), - .regExpSub = expressionSub == NULL ? NULL : regExpNew(STRDEF(expressionSub)), + .regExpSub = expressionSub == NULL ? NULL : regExpNew(STR(expressionSub)), .replacement = strNewZ(replacement), .matchList = strLstNew(), .version = version,