diff options
author | Volker Lendecke <vl@samba.org> | 2013-08-13 10:50:15 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-08-16 01:51:55 +0200 |
commit | 0a42493763509880e0aa34fc59c78875e6f9af08 (patch) | |
tree | edb31afe07cf2a0a512d0ccf3e0693d2e2692b06 /source3/lib | |
parent | e0bda35cf5f3b4d0da9a1c1a6b84a49390d4e3e2 (diff) | |
download | samba-0a42493763509880e0aa34fc59c78875e6f9af08.tar.gz samba-0a42493763509880e0aa34fc59c78875e6f9af08.tar.bz2 samba-0a42493763509880e0aa34fc59c78875e6f9af08.zip |
libctdb: Avoid an explicit memset
Give the compiler a chance to use better code. Saves a few bytes of text.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 16 01:51:55 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 1481a9c185..4f5dce05dd 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -201,7 +201,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx, { struct ctdb_packet_context *result; const char *sockname = lp_ctdbd_socket(); - struct sockaddr_un addr; + struct sockaddr_un addr = { 0, }; int fd; socklen_t salen; @@ -211,7 +211,6 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx, return map_nt_error_from_unix(errno); } - ZERO_STRUCT(addr); addr.sun_family = AF_UNIX; snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", sockname); |