diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-06 20:04:38 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-06 20:04:38 +0100 |
commit | 1e992efe91f4f171c541fd6b91b2abf17583d406 (patch) | |
tree | 5e442651b1922c9a2fdee01ac416f64d68378976 | |
parent | 52e9f0ae7bd719976381598623d1e6cf6dd337b3 (diff) | |
download | sds-1e992efe91f4f171c541fd6b91b2abf17583d406.tar.xz |
twbctf: Save the print_width to a variable
-rw-r--r-- | src/twbctf.c | 7 |
1 files 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; } } |