summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2015-02-11 07:44:53 +0000
committerjmg <jmg@FreeBSD.org>2015-02-11 07:44:53 +0000
commit884afc8873c3ca92829d975b3e9cc0b09723fa8c (patch)
tree7bac2d688f728dbb8df8bea9a49b15f96d9f10b0
parent91f6f509344ce452d5ed44549c65a72e6d4119bc (diff)
downloadFreeBSD-src-884afc8873c3ca92829d975b3e9cc0b09723fa8c.zip
FreeBSD-src-884afc8873c3ca92829d975b3e9cc0b09723fa8c.tar.gz
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
-rw-r--r--contrib/top/utils.c1
1 files changed, 1 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud