]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Do not use C99-only construct (fixes #1000) 1004/head
authorZdenek Dohnal <zdohnal@redhat.com>
Mon, 8 Jul 2024 11:44:59 +0000 (13:44 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Mon, 8 Jul 2024 11:44:59 +0000 (13:44 +0200)
Use the existing `ptr` instead of a new.

Fixes #1000

scheduler/client.c

index 69564f82f14becd029e5714b11cebd37d1b5ca7f..9c2f1ef81487a17cb7f4d1657b79948a67ac238a 100644 (file)
@@ -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';