enh: refactor return code
This commit is contained in:
parent
235712b79e
commit
2c5743a370
|
@ -932,7 +932,7 @@ void taosLogCrashInfo(char *nodeType, char *pMsg, int64_t msgLen, int signum, vo
|
||||||
goto _return;
|
goto _return;
|
||||||
}
|
}
|
||||||
|
|
||||||
taosUnLockFile(pFile);
|
(void)taosUnLockFile(pFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
_return:
|
_return:
|
||||||
|
|
|
@ -320,7 +320,7 @@ char *strbetween(char *string, char *begin, char *end) {
|
||||||
int32_t size = (int32_t)(_end - _begin);
|
int32_t size = (int32_t)(_end - _begin);
|
||||||
if (_end != NULL && size > 0) {
|
if (_end != NULL && size > 0) {
|
||||||
result = (char *)taosMemoryCalloc(1, size);
|
result = (char *)taosMemoryCalloc(1, size);
|
||||||
if (result) {
|
if (!result) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memcpy(result, _begin + strlen(begin), size - +strlen(begin));
|
memcpy(result, _begin + strlen(begin), size - +strlen(begin));
|
||||||
|
|
Loading…
Reference in New Issue