Port: Replace bzero() by memset()
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 28 Sep 2015 14:50:54 +0000 (10:50 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 16 Oct 2015 19:40:28 +0000 (15:40 -0400)
bzero() was deprecated in POSIX 2001 and removed from POSIX 2008,
while memset() is part of standard C.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
formats/lttng-live/lttng-live-comm.c

index fee56acaef28d1504645114e095957bd1d3968b0..375de6ba2d529b99f47c478f2b67e4d4ae6c6178 100644 (file)
@@ -62,7 +62,7 @@ AC_TYPE_SIZE_T
 # Checks for library functions.
 AC_FUNC_MALLOC
 AC_FUNC_MMAP
-AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
+AC_CHECK_FUNCS([gettimeofday munmap strtoul])
 
 # Check for MinGW32.
 MINGW32=no
index eb9b8da4c3017176ca513a8fb4501c1d1fc05afa..d60126f4dd981c18097996611c497ffe9b8d712d 100644 (file)
@@ -134,7 +134,7 @@ int lttng_live_connect_viewer(struct lttng_live_ctx *ctx)
        server_addr.sin_family = AF_INET;
        server_addr.sin_port = htons(ctx->port);
        server_addr.sin_addr = *((struct in_addr *) host->h_addr);
-       bzero(&(server_addr.sin_zero), 8);
+       memset(&(server_addr.sin_zero), 0, 8);
 
        if (connect(ctx->control_sock, (struct sockaddr *) &server_addr,
                                sizeof(struct sockaddr)) == -1) {
This page took 0.034694 seconds and 4 git commands to generate.