summaryrefslogtreecommitdiff
path: root/src/cgtop
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-08-20 14:57:02 +0100
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-08-20 18:29:40 +0100
commit121ed16cafadc209602ca45dc6215bf5a7d85632 (patch)
treeb96d5cd8bd736fa4573c0dc444f994f9f6ca21ec /src/cgtop
parent272fff7d8421767ef2caa60e982cf1bdae2c086c (diff)
downloadsystemd-121ed16cafadc209602ca45dc6215bf5a7d85632.tar.gz
tree-wide: voidify unchecked snprintf calls
According to Coverity, 194 ouf of 227 times we check for snprintf return code. Voidify the rest. CID#1461512 CID#1461513 CID#1461514 CID#1461515 CID#1461516 CID#1461518 CID#1461519 CID#1461520 CID#1461522
Diffstat (limited to 'src/cgtop')
-rw-r--r--src/cgtop/cgtop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index 0104b6a543..e5ab904c4f 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -95,7 +95,7 @@ static Group *group_free(Group *g) {
static const char *maybe_format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
if (arg_raw) {
- snprintf(buf, l, USEC_FMT, t);
+ (void) snprintf(buf, l, USEC_FMT, t);
return buf;
}
return format_timespan(buf, l, t, accuracy);
@@ -109,7 +109,7 @@ static const char *maybe_format_bytes(char *buf, size_t l, bool is_valid, uint64
if (!is_valid)
return "-";
if (arg_raw) {
- snprintf(buf, l, "%" PRIu64, t);
+ (void) snprintf(buf, l, "%" PRIu64, t);
return buf;
}
return format_bytes(buf, l, t);