Avoid setting the password to a const empty string, but set the first char to \0. This avoids a warning.

This commit is contained in:
nekral-guest 2008-01-06 19:26:58 +00:00
parent e663f6c0b4
commit 85febc5729
2 changed files with 6 additions and 1 deletions

View File

@ -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(),

View 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') {