From: nekral-guest Date: Sun, 6 Jan 2008 19:26:58 +0000 (+0000) Subject: Avoid setting the password to a const empty string, but set the first char to \0... X-Git-Tag: 4.1.1~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85febc57298503845d6505f72edb853bde4842e5;p=thirdparty%2Fshadow.git Avoid setting the password to a const empty string, but set the first char to \0. This avoids a warning. --- diff --git a/ChangeLog b/ChangeLog index 8bbd28035..e6443b7e1 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 9c1c6841f..a6b5643c0 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') {