Skip to content

Commit 1f786e2

Browse files
committed
fix spurious compiler warning with -Wformat-truncation
1 parent 348ede3 commit 1f786e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checktxt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#define xxprintf(...) \
3535
{ char buffer; /* needed for older glibc */ \
36-
int t = snprintf(&buffer, 1, ##__VA_ARGS__); \
36+
int t = snprintf(&buffer, 0, ##__VA_ARGS__); \
3737
elements[elidx]=alloca(t+1); \
3838
snprintf(elements[elidx], t+1, ##__VA_ARGS__); \
3939
len+=t; elidx++; }

0 commit comments

Comments
 (0)