aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-06 20:04:38 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-12-06 20:04:38 +0100
commit1e992efe91f4f171c541fd6b91b2abf17583d406 (patch)
tree5e442651b1922c9a2fdee01ac416f64d68378976
parent52e9f0ae7bd719976381598623d1e6cf6dd337b3 (diff)
downloadsds-1e992efe91f4f171c541fd6b91b2abf17583d406.tar.xz
twbctf: Save the print_width to a variable
-rw-r--r--src/twbctf.c7
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;
}
}