From: Ruediger Meier Date: Wed, 24 Feb 2016 01:07:57 +0000 (+0100) Subject: newgrp: rename memset_s() X-Git-Tag: v2.28-rc1~64^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbbf2aa85323f9aec3d7674d037d5245bb289b42;p=thirdparty%2Futil-linux.git newgrp: rename memset_s() It's already defined in OSX standard c library. Signed-off-by: Ruediger Meier --- diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c index 141b41bf40..56639d1f0b 100644 --- a/login-utils/newgrp.c +++ b/login-utils/newgrp.c @@ -62,7 +62,7 @@ static char *xgetpass(FILE *input, const char *prompt) /* Ensure memory is set to value c without compiler optimization getting * into way that could happen with memset(3). */ -static int memset_s(void *v, size_t sz, const int c) +static int xmemset_s(void *v, size_t sz, const int c) { volatile unsigned char *p = v; @@ -148,7 +148,7 @@ static int allow_setgid(const struct passwd *pe, const struct group *ge) if (pwd && *pwd && (xpwd = xgetpass(stdin, _("Password: ")))) { char *cbuf = crypt(xpwd, pwd); - memset_s(xpwd, strlen(xpwd), 0); + xmemset_s(xpwd, strlen(xpwd), 0); free(xpwd); if (!cbuf) warn(_("crypt failed"));