From 8252e8e67f75f66b096d574d7e31e940e03a6b60 Mon Sep 17 00:00:00 2001 From: Michal Bloch Date: Tue, 17 Sep 2019 12:39:08 +0200 Subject: [PATCH] Fix a complaint by SVACE static analysis Change-Id: I289f2d9684332ee1bf7e9b8eb3f971e177443ef3 Signed-off-by: Michal Bloch --- tests/watchdog-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/watchdog-test.c b/tests/watchdog-test.c index b654e1a..7deff90 100644 --- a/tests/watchdog-test.c +++ b/tests/watchdog-test.c @@ -109,7 +109,9 @@ void save_core_pattern() if (fd < 0) return; ret = read(fd, core_pattern, sizeof(core_pattern)); - if (ret < 0); /* do nothing */ + if (ret < 0) { + // do nothing + } close(fd); } @@ -121,7 +123,9 @@ void set_core_pattern(const char *t) if (fd < 0) return; ret = write(fd, t, strlen(t)); - if (ret < 0); /* do nothing */ + if (ret < 0) { + // do nothing + } close(fd); } -- 2.7.4