From 971f3e72d4d57d335e459b731493c3ee1b7b1660 Mon Sep 17 00:00:00 2001 From: "Stiliyan Tonev (Bark)" Date: Tue, 14 Jan 2025 12:08:28 +0200 Subject: [PATCH] Return for-s to their previous format. --- common/optparser.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/optparser.c b/common/optparser.c index bec0e6508b..44beaba484 100644 --- a/common/optparser.c +++ b/common/optparser.c @@ -1015,7 +1015,8 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo break; buff = buffer; - for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++); + for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++) + ; buff += i; line++; if (strlen(buff) <= 2 || buff[0] == '#') @@ -1036,9 +1037,11 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo } name = buff; *pt++ = 0; - for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++); + for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++) + ; pt += i; - for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--); + for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--) + ; if (!i) { if (verbose) fprintf(stderr, "ERROR: Missing argument for option at %s:%d\n", cfgfile, line);