fix(stream): check return value.
This commit is contained in:
parent
d8098ab3e1
commit
3559188dfa
|
@ -131,7 +131,7 @@ void stopRsync() {
|
||||||
int32_t ret = tsnprintf(buf, tListLen(buf), "kill -9 %d", pid);
|
int32_t ret = tsnprintf(buf, tListLen(buf), "kill -9 %d", pid);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
uInfo("kill rsync program pid:%d", pid);
|
uInfo("kill rsync program pid:%d", pid);
|
||||||
system(buf);
|
code = system(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -267,7 +267,7 @@ int32_t taosGetPIdByName(const char* name, int32_t* pPId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
sscanf(buf, "%*s %s", bufx);
|
ret = sscanf(buf, "%*s %s", bufx);
|
||||||
if (!strcmp(bufx, name)) {
|
if (!strcmp(bufx, name)) {
|
||||||
char* end = NULL;
|
char* end = NULL;
|
||||||
*pPId = taosStr2Int32(ptr->d_name, &end, 10);
|
*pPId = taosStr2Int32(ptr->d_name, &end, 10);
|
||||||
|
|
Loading…
Reference in New Issue