Remove all usages of bzero() and bcopy()
The bzero() and bcopy() functions are deprecated and were removed from the POSIX standard in IEEE Std. 1003.1-2008. Remove all usages of bzero()/bcopy() and replace them by appropriate memset()/memmove() calls. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -135,7 +135,7 @@ keys_init (void)
|
||||
|
||||
for (i = 0; i < MAXKEYVAL; i++)
|
||||
actions[i] = KEY_UNDEF;
|
||||
bzero (keys, NBKEYS);
|
||||
memset (keys, 0, NBKEYS);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -442,7 +442,7 @@ keys_format_label (char *key, int keylen)
|
||||
if (keylen > BUFSIZ)
|
||||
return NULL;
|
||||
|
||||
bzero (fmtkey, sizeof (fmtkey));
|
||||
memset (fmtkey, 0, sizeof(fmtkey));
|
||||
if (len == 0)
|
||||
strncpy (fmtkey, "?", sizeof (fmtkey));
|
||||
else if (len <= keylen)
|
||||
|
||||
Reference in New Issue
Block a user