summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/slstatus.c b/slstatus.c
index 0c4605f..3222b02 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -91,12 +91,8 @@ main(int argc, char *argv[])
if (!(res = args[i].func(args[i].args))) {
res = unknown_str;
}
- if ((ret = snprintf(status + len, sizeof(status) - len,
+ if ((ret = esnprintf(status + len, sizeof(status) - len,
args[i].fmt, res)) < 0) {
- warn("snprintf:");
- break;
- } else if ((size_t)ret >= sizeof(status) - len) {
- warn("snprintf: Output truncated");
break;
}
len += ret;