From 1e992efe91f4f171c541fd6b91b2abf17583d406 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 6 Dec 2014 20:04:38 +0100 Subject: twbctf: Save the print_width to a variable --- src/twbctf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/twbctf.c b/src/twbctf.c index 32d2f9e..af95c10 100644 --- a/src/twbctf.c +++ b/src/twbctf.c @@ -33,9 +33,10 @@ signed main (void) { int print_width = 0; - for (int i = 0; i < TEST_COUNT; i++) { - if (strlen(test_list[i].desc) > print_width) { - print_width = strlen(test_list[i].desc); + for (size_t i = 0; i < TEST_COUNT; i++) { + int length = (int)strlen(test_list[i].desc); + if (length > print_width) { + print_width = length; } } -- cgit v1.2.3-70-g09d2