]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Avoid setting the password to a const empty string, but set the first char to \0...
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 19:26:58 +0000 (19:26 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 19:26:58 +0000 (19:26 +0000)
ChangeLog
src/passwd.c

index 8bbd2803541f0874d0597e49780bd527413e7944..e6443b7e15bef034960be233f25b2602cc4ba9e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/passwd.c: Avoid setting the password to a const empty
+       string, but set the first char to \0. This avoids a warning.
+
 2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/salt.c: Add prototype for l64a(), gensalt(),
index 9c1c6841f5c8694f3cc82ff23cbfee1b766a14bc..a6b5643c0787d811c556c827f0873a432d8acf61 100644 (file)
@@ -468,7 +468,7 @@ static char *update_crypt_pw (char *cp)
 #endif
 
        if (dflg)
-               cp = "";        /* XXX warning: const */
+               *cp = '\0';
 
        if (uflg && *cp == '!') {
                if (cp[1] == '\0') {