summaryrefslogtreecommitdiffstats
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2015-06-18 23:55:24 +0000
committernicm <nicm>2015-06-18 23:55:24 +0000
commitb43b13faf9ba620c3150bfe459fe6b38e58f6079 (patch)
treedea00a9bb4c9f8458c0e9677661ddb53ffd7444b /format.c
parent164ba041c9301d8c804a9f76da8ac62a8de286de (diff)
Use xsnprintf.
Diffstat (limited to 'format.c')
-rw-r--r--format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/format.c b/format.c
index 67bce925..8a52b0e1 100644
--- a/format.c
+++ b/format.c
@@ -338,7 +338,7 @@ format_find(struct format_tree *ft, const char *key)
case OPTIONS_STRING:
return (o->str);
case OPTIONS_NUMBER:
- snprintf(s, sizeof s, "%lld", o->num);
+ xsnprintf(s, sizeof s, "%lld", o->num);
return (s);
case OPTIONS_STYLE:
return (style_tostring(&o->style));
@@ -679,7 +679,7 @@ format_defaults_session(struct format_tree *ft, struct session *s)
RB_FOREACH (wl, winlinks, &s->windows) {
if ((wl->flags & WINLINK_ALERTFLAGS) == 0)
continue;
- snprintf(tmp, sizeof tmp, "%u", wl->idx);
+ xsnprintf(tmp, sizeof tmp, "%u", wl->idx);
if (*alerts != '\0')
strlcat(alerts, ",", sizeof alerts);