From 884afc8873c3ca92829d975b3e9cc0b09723fa8c Mon Sep 17 00:00:00 2001 From: jmg Date: Wed, 11 Feb 2015 07:44:53 +0000 Subject: add an assert in case the sizeof int ever becomes bigger.. Then we will have issues, at least we'll know where one of them are.. Submitted by: Erich Dollansky --- contrib/top/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/top/utils.c b/contrib/top/utils.c index 43072b1..807f7ee 100644 --- a/contrib/top/utils.c +++ b/contrib/top/utils.c @@ -58,6 +58,7 @@ char *str; * ever convert will be 2^32-1, which is 10 * digits. */ +_Static_assert(sizeof(int) <= 4, "buffer too small for this sized int"); char *itoa(val) -- cgit v1.1