style: better local variables

This commit is contained in:
2025-11-10 15:39:26 +01:00
parent cfbeeda57a
commit a8af10c1c5
10 changed files with 107 additions and 124 deletions
+5 -2
View File
@@ -41,16 +41,19 @@ static bool is_digit(char c) { return c >= '0' && c <= '9'; }
bool string_is_number(char *value) {
unsigned long value_len;
unsigned int i;
if (value == NULL) {
return false;
}
value_len = strnlen(value, STR_LEN);
for (i = 0; i < value_len; i++) {
for (unsigned int i = 0; i < value_len; i++) {
if (!is_digit(value[i])) {
return false;
}
}
return true;
}