diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-04 15:35:31 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-06 15:07:27 +0700 |
commit | 5a0fc0ad21d562612676ef88ef2d533b2391810a (patch) | |
tree | 6a88d6c9f6194165e08c934f50ac490d8c381ac6 /os | |
parent | f9810ba914877b379cb36f1b9755f7923ceca14c (diff) |
Replace deprecated bzero with memset
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Marcin BaczyĆski <marbacz@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'os')
-rw-r--r-- | os/access.c | 4 | ||||
-rw-r--r-- | os/connection.c | 2 | ||||
-rw-r--r-- | os/utils.c | 4 | ||||
-rw-r--r-- | os/xdmauth.c | 2 | ||||
-rw-r--r-- | os/xdmcp.c | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/os/access.c b/os/access.c index 2473ba456..36e1b81a6 100644 --- a/os/access.c +++ b/os/access.c @@ -311,7 +311,7 @@ ifioctl (int fd, int cmd, char *arg) struct strioctl ioc; int ret; - bzero((char *) &ioc, sizeof(ioc)); + memset((char *) &ioc, 0, sizeof(ioc)); ioc.ic_cmd = cmd; ioc.ic_timout = 0; if (cmd == SIOCGIFCONF) @@ -1038,7 +1038,7 @@ ResetHosts (char *display) len = sizeof(saddr.sa); if (ConvertAddr (&saddr.sa, &len, (pointer *)&addr) == FamilyDECnet) { - bzero ((char *) &dnaddr, sizeof (dnaddr)); + memset((char *) &dnaddr, 0, sizeof (dnaddr)); dnaddr.a_len = np->n_length; acopy (np->n_addr, dnaddr.a_addr, np->n_length); dnaddrp = &dnaddr; diff --git a/os/connection.c b/os/connection.c index bbcfa51f6..293f31a21 100644 --- a/os/connection.c +++ b/os/connection.c @@ -183,7 +183,7 @@ struct _ct_node *ct_head[256]; void InitConnectionTranslation(void) { - bzero(ct_head, sizeof(ct_head)); + memset(ct_head, 0, sizeof(ct_head)); } int GetConnectionTranslation(int conn) diff --git a/os/utils.c b/os/utils.c index 7aa392ad8..b4a954f76 100644 --- a/os/utils.c +++ b/os/utils.c @@ -979,7 +979,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client) gethostname(hname, 1024); #if defined(IPv6) && defined(AF_INET6) - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; if (getaddrinfo(hname, NULL, &hints, &ai) == 0) { hnameptr = ai->ai_canonname; @@ -1178,7 +1178,7 @@ SmartScheduleInit (void) if (SmartScheduleDisable) return TRUE; - bzero ((char *) &act, sizeof(struct sigaction)); + memset((char *) &act, 0, sizeof(struct sigaction)); /* Set up the timer signal function */ act.sa_handler = SmartScheduleTimer; diff --git a/os/xdmauth.c b/os/xdmauth.c index 31c1b4c41..b8cbada18 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -139,7 +139,7 @@ HexToBinary (const char *in, char *out, int len) void XdmAuthenticationInit (const char *cookie, int cookie_len) { - bzero (privateKey.data, 8); + memset(privateKey.data, 0, 8); if (!strncmp (cookie, "0x", 2) || !strncmp (cookie, "0X", 2)) { if (cookie_len > 2 + 2 * 8) diff --git a/os/xdmcp.c b/os/xdmcp.c index 38b2197a1..e03f17e40 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -338,7 +338,7 @@ XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr) if (NumBroadcastAddresses >= MAX_BROADCAST) return; bcast = &BroadcastAddresses[NumBroadcastAddresses++]; - bzero (bcast, sizeof (struct sockaddr_in)); + memset(bcast, 0, sizeof (struct sockaddr_in)); #ifdef BSD44SOCKETS bcast->sin_len = addr->sin_len; #endif @@ -1483,7 +1483,7 @@ get_addr_by_name( char *pport = portstr; int gaierr; - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_socktype = socktype; if (port == 0) { @@ -1616,7 +1616,7 @@ get_mcast_options(int argc, char **argv, int i) } else { FatalError("Xserver: port out of range: %d\n", xdm_udp_port); } - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; if ((gaierr = getaddrinfo(address, portstr, &hints, &firstai)) == 0) { |