From 0123385b40ff105f32d65092d90d15aecd8f79a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 20 Aug 2019 18:08:15 +0200 Subject: [PATCH] Command line: Improve code style in function --- command-line.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command-line.c b/command-line.c index 560ac97..6d40d14 100644 --- a/command-line.c +++ b/command-line.c @@ -41,14 +41,13 @@ static int string_array_count(char **string_array) { - int count = 0; + int count; if (!string_array) return 0; - for (; *string_array; string_array++) { + for (count = 0; *string_array; string_array++) count++; - } return count; }