]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/chfn.c: copy_field(): Rename local variable
authorAlejandro Colomar <alx@kernel.org>
Mon, 17 Feb 2025 14:33:46 +0000 (15:33 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sun, 2 Mar 2025 22:08:19 +0000 (16:08 -0600)
This makes it more obvious what that pointer is.

Tested-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/chfn.c

index 3fc94dce169eed4f388b55e4d7d47e36c395d4d9..834a0a277129b7fa4fc3eed2f3fd8474551a2f17 100644 (file)
@@ -217,13 +217,13 @@ static void new_fields (void)
  */
 static char *copy_field (char *in, char *out, char *extra)
 {
-       char *cp = NULL;
+       char  *next = NULL;
 
        while (NULL != in) {
                const char  *f;
 
                f = in;
-               cp = stpsep(in, ",");
+               next = stpsep(in, ",");
 
                if (strchr(f, '=') == NULL)
                        break;
@@ -235,13 +235,13 @@ static char *copy_field (char *in, char *out, char *extra)
 
                        strcat(extra, f);
                }
-               in = cp;
+               in = next;
        }
        if ((NULL != in) && (NULL != out)) {
                strcpy (out, in);
        }
 
-       return cp;
+       return next;
 }
 
 /*