Skip to content

Commit 974f40a

Browse files
authored
Fix harmless -Wsign-compare warning (#699)
`sizeof(buf) == 128` so the signed comparison is always within range.
1 parent e1a0f4f commit 974f40a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int __attribute__((format(printf, 2, 3))) dbuf_printf(DynBuf *s,
190190
va_start(ap, fmt);
191191
len = vsnprintf(buf, sizeof(buf), fmt, ap);
192192
va_end(ap);
193-
if (len < sizeof(buf)) {
193+
if (len < (int)sizeof(buf)) {
194194
/* fast case */
195195
return dbuf_put(s, (uint8_t *)buf, len);
196196
} else {

0 commit comments

Comments
 (0)