summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-02-27 16:05:42 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2016-02-27 16:05:42 +0100
commita6b8f513b92b52ce7462a0c61c7c4843e2f12618 (patch)
tree55dac63580120e7c8cf14675037de2788d2efdf8
parent1ce0eaeb223072b94d77f5b818e48ae070ba9e5a (diff)
consistency: check snprintf result == -1
-rw-r--r--sfeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed.c b/sfeed.c
index eab0dec..20572c0 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -318,7 +318,7 @@ time_ok:
} else {
r = snprintf(buf, bufsiz, "%s%c%02d:%02d",
tz[0] ? tz : "UTC", c, tzhour, tzmin);
- if (r < 0 || (size_t)r >= bufsiz)
+ if (r == -1 || (size_t)r >= bufsiz)
return -1; /* truncation or error */
}
if (tzoffset)