From ae276e70ab6cc219dd90eb7142fca6a1f48599e3 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Thu, 16 Mar 2023 11:00:37 +0300 Subject: [PATCH] Remove unnecessary check --- src/backend/distributed/utils/attribute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/distributed/utils/attribute.c b/src/backend/distributed/utils/attribute.c index 96bd2f3b1..707a6f7a2 100644 --- a/src/backend/distributed/utils/attribute.c +++ b/src/backend/distributed/utils/attribute.c @@ -627,8 +627,7 @@ ExtractTopComment(const char *inputString) { /* Skip the comment start characters */ commentEndCharsIndex += commentStartCharsLength; - while (inputString[commentEndCharsIndex] && - commentEndCharsIndex < inputStringLen && + while (commentEndCharsIndex < inputStringLen && !(inputString[commentEndCharsIndex] == '*' && inputString [commentEndCharsIndex + 1] == '/')) { @@ -708,7 +707,8 @@ UnescapeCommentChars(const char *str) { if (str[originalStringindex] == '\\' && originalStringindex < originalStringLength - 1 && (str[originalStringindex + 1] == '*' || - str[originalStringindex + 1] == '/')) + str + [originalStringindex + 1] == '/')) { originalStringindex++; }