1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

merge from volker to prevent some valgrind errors

(This used to be ctdb commit ab516a6dcc6871cdbf781892adcd2c77e4c631c2)
This commit is contained in:
Ronnie sahlberg 2007-04-17 18:15:08 +10:00
commit efd5c4bf83

View File

@ -89,7 +89,7 @@ static void daemon_message_handler(struct ctdb_context *ctdb, uint32_t srvid,
/*XXX cant use this since it returns an int CTDB_NO_MEMORY(ctdb, r);*/
talloc_set_name_const(r, "req_message packet");
ZERO_STRUCT(*r);
memset(r, 0, offsetof(struct ctdb_req_message, data));
r->hdr.length = len;
r->hdr.ctdb_magic = CTDB_MAGIC;
@ -171,7 +171,7 @@ static void daemon_fetch_lock_complete(struct ctdb_call_state *state)
printf("Failed to allocate reply_call in ctdb daemon\n");
return;
}
ZERO_STRUCT(*r);
memset(r, 0, offsetof(struct ctdb_reply_fetch_lock, data));
r->hdr.length = length;
r->hdr.ctdb_magic = CTDB_MAGIC;
r->hdr.ctdb_version = CTDB_VERSION;
@ -347,7 +347,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
printf("Failed to allocate reply_call in ctdb daemon\n");
return;
}
ZERO_STRUCT(*r);
memset(r, 0, offsetof(struct ctdb_reply_call, data));
r->hdr.length = length;
r->hdr.ctdb_magic = CTDB_MAGIC;
r->hdr.ctdb_version = CTDB_VERSION;