1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

ctdb-client: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Amitay Isaacs 2013-11-11 12:39:48 +11:00 committed by Michael Adam
parent 6d1b74f052
commit c72e745511

View File

@ -253,7 +253,7 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, ctdb->daemon.name, sizeof(addr.sun_path));
strncpy(addr.sun_path, ctdb->daemon.name, sizeof(addr.sun_path)-1);
ctdb->daemon.sd = socket(AF_UNIX, SOCK_STREAM, 0);
if (ctdb->daemon.sd == -1) {
@ -3444,6 +3444,9 @@ static void async_callback(struct ctdb_client_control_state *state)
int32_t res = -1;
uint32_t destnode = state->c->hdr.destnode;
outdata.dsize = 0;
outdata.dptr = NULL;
/* one more node has responded with recmode data */
data->count--;