From bebe2c5266a71565921519b8eee4ac4ec81e5664 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Fri, 19 Jul 2024 11:36:03 +0800 Subject: [PATCH] feat: (errcode) geosWrapper.c --- source/libs/geometry/src/geosWrapper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/geometry/src/geosWrapper.c b/source/libs/geometry/src/geosWrapper.c index c7c83f4796..c5250c8481 100644 --- a/source/libs/geometry/src/geosWrapper.c +++ b/source/libs/geometry/src/geosWrapper.c @@ -86,9 +86,9 @@ _exit: return code; } -static int initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) { - int ret = 0; - char *wktPatternWithSpace = taosMemoryCalloc(4, 1024); +static int32_t initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) { + int32_t code = 0; + char *wktPatternWithSpace = taosMemoryCalloc(4, 1024); sprintf( wktPatternWithSpace, "^( *)point( *)z?m?( *)((empty)|(\\(( *)(([-+]?[0-9]+\\.?[0-9]*)|([-+]?[0-9]*\\.?[0-9]+))(e[-+]?[0-9]+)?(( " @@ -142,9 +142,9 @@ static int initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) { "*)(([-+]?[0-9]+\\.?[0-9]*)|([-+]?[0-9]*\\.?[0-9]+))(e[-+]?[0-9]+)?){1,3}( *))*( *)\\)))( *))*( *)\\)))( *))*( " "*)\\)))|(GEOCOLLECTION\\((?R)(( *)(,)( *)(?R))*( *)\\))( *)$"); - ret = doRegComp(ppRegex, ppMatchData, wktPatternWithSpace); + code = doRegComp(ppRegex, ppMatchData, wktPatternWithSpace); taosMemoryFree(wktPatternWithSpace); - return ret; + return code; } int32_t initCtxGeomFromText() {