diff --git a/ChangeLog b/ChangeLog index 8bbd2803..e6443b7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-06 Nicolas François + + * 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 * libmisc/salt.c: Add prototype for l64a(), gensalt(), diff --git a/src/passwd.c b/src/passwd.c index 9c1c6841..a6b5643c 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -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') {