1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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
This commit is contained in:
Volker Lendecke 2013-08-13 10:50:15 +00:00 committed by Jeremy Allison
parent e0bda35cf5
commit 0a42493763

View File

@ -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);