summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xservice/system/resource_manager/server/src/resm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/system/resource_manager/server/src/resm.cpp b/service/system/resource_manager/server/src/resm.cpp
index 6bed6bd..f44d9b4 100755
--- a/service/system/resource_manager/server/src/resm.cpp
+++ b/service/system/resource_manager/server/src/resm.cpp
@@ -1897,7 +1897,7 @@ static void exec_perf_Resourcemanagerlog_Perf_Data(
// LCOV_EXCL_STOP 5: fopen error case
}
perf_lines = 0;
- while (fgets(buf, sizeof(buf), rfd) > 0) {
+ while (fgets(buf, sizeof(buf), rfd) != NULL) {
if (perf_lines >= PERF_MAX_LINES) {
break;
}
@@ -2107,7 +2107,7 @@ static void logging_cpuload(void) {
// LCOV_EXCL_STOP 5: kill error case
}
} else {
- while (fgets(buf, sizeof(buf), stdin) > 0) {
+ while (fgets(buf, sizeof(buf), stdin) != NULL) {
// Save ProcessName and Process ID to exec perf
if (logLine >= 2 && perfNum < PERF_MAX_PROCS) {
buf2[0] = 0;
@@ -2491,7 +2491,7 @@ static int write_cpuinfo_work(FILE *wfp) {
}
// LCOV_EXCL_STOP
} else {
- while (fgets(buf, sizeof(buf), stdin) > 0) {
+ while (fgets(buf, sizeof(buf), stdin) != NULL) {
if (logLine == 0) {
if (buf[0] != 'C') {
continue;