From 3559188dfa007c2a1679d0d12fcad630b61b9d58 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 8 Nov 2024 14:23:37 +0800 Subject: [PATCH] fix(stream): check return value. --- source/common/src/rsync.c | 2 +- source/os/src/osSemaphore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/rsync.c b/source/common/src/rsync.c index 15c296d730..8b453f7d82 100644 --- a/source/common/src/rsync.c +++ b/source/common/src/rsync.c @@ -131,7 +131,7 @@ void stopRsync() { int32_t ret = tsnprintf(buf, tListLen(buf), "kill -9 %d", pid); if (ret > 0) { uInfo("kill rsync program pid:%d", pid); - system(buf); + code = system(buf); } } #endif diff --git a/source/os/src/osSemaphore.c b/source/os/src/osSemaphore.c index 1b9e8d3273..e37182ce16 100644 --- a/source/os/src/osSemaphore.c +++ b/source/os/src/osSemaphore.c @@ -267,7 +267,7 @@ int32_t taosGetPIdByName(const char* name, int32_t* pPId) { continue; } - sscanf(buf, "%*s %s", bufx); + ret = sscanf(buf, "%*s %s", bufx); if (!strcmp(bufx, name)) { char* end = NULL; *pPId = taosStr2Int32(ptr->d_name, &end, 10);