From: Zdenek Dohnal Date: Mon, 8 Jul 2024 11:44:59 +0000 (+0200) Subject: Do not use C99-only construct (fixes #1000) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1004%2Fhead;p=thirdparty%2Fcups.git Do not use C99-only construct (fixes #1000) Use the existing `ptr` instead of a new. Fixes #1000 --- diff --git a/scheduler/client.c b/scheduler/client.c index 69564f82f1..9c2f1ef814 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -1112,8 +1112,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ { unsigned int i = 0; // Array index - for (char *start = con->uri + 9; *start && *start != '?' && i < sizeof(name);) - name[i++] = *start++; + for (ptr = con->uri + 9; *ptr && *ptr != '?' && i < sizeof(name);) + name[i++] = *ptr++; name[i] = '\0'; @@ -1152,8 +1152,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ { unsigned int i = 0; // Array index - for (char *start = con->uri + 10; *start && *start != '?' && i < sizeof(name);) - name[i++] = *start++; + for (ptr = con->uri + 10; *ptr && *ptr != '?' && i < sizeof(name);) + name[i++] = *ptr++; name[i] = '\0';