summaryrefslogtreecommitdiff
path: root/src/auth_time.c
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2017-08-23 14:31:36 -0400
committerSteve Dickson <steved@redhat.com>2017-08-23 14:32:56 -0400
commit5356b63005e9d8169e0399cb76f26fbd29a78dee (patch)
tree8f400a06bd6fe31bf1a6e985a8f4353d36194b6b /src/auth_time.c
parentccc63fec27c84209f15fb34279acbe7cb6a7fe1c (diff)
downloadti-rpc-5356b63005e9d8169e0399cb76f26fbd29a78dee.tar.gz
Replace bzero() calls with equivalent memset() calls
As annotated in the bzero(3) man page, bzero() was marked as LEGACY in POSIX.1-2001 and removed in POSIX.1-2008, and should be replaced with memset() calls to write zeros to a memory region. The attached patch replaces two bzero() calls and one __bzero() call in libtirpc with equivalent memset() calls. The latter replacement fixes a compile error under uclibc-ng, which lacks a definition for __bzero() Signed-off-by: Joshua Kinard <kumba@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/auth_time.c')
-rw-r--r--src/auth_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth_time.c b/src/auth_time.c
index 7f83ab4..69400bc 100644
--- a/src/auth_time.c
+++ b/src/auth_time.c
@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
useua = &ipuaddr[0];
- bzero((char *)&sin, sizeof(sin));
+ memset(&sin, 0, sizeof(sin));
if (uaddr_to_sockaddr(useua, &sin)) {
msg("unable to translate uaddr to sockaddr.");
if (needfree)