From 58f8347e84d2820cada64c513bb0f2b81ecd494a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 Jul 2016 16:00:34 +0200 Subject: Fix new GCC warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-registry/registry.c | 4 ++-- src/mds-registry/slave.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mds-registry') diff --git a/src/mds-registry/registry.c b/src/mds-registry/registry.c index 964b55f..77cd463 100644 --- a/src/mds-registry/registry.c +++ b/src/mds-registry/registry.c @@ -155,7 +155,7 @@ static int registry_action_add(int has_key, char* command, size_t command_key, u void* address; fail_if (xmalloc(address = list, 1, client_list_t)); /* Duplicate the protocol name so it can be accessed later. */ - if (xstrdup(command, command)) + if (xstrdup_nn(command, command)) { saved_errno = errno, free(list), errno = saved_errno; fail_if (1); @@ -240,7 +240,7 @@ static int registry_action_act(char* command, int action, uint64_t client, hash_ else if ((action == 0) && !has_key) { /* Add protocol to wait set of not present in the protocol table. */ - fail_if (xstrdup(command, command)); + fail_if (xstrdup_nn(command, command)); command_key = (size_t)(void*)command; if (hash_table_put(wait_set, command_key, 1) == 0) if (errno) diff --git a/src/mds-registry/slave.c b/src/mds-registry/slave.c index 3d60437..b936c29 100644 --- a/src/mds-registry/slave.c +++ b/src/mds-registry/slave.c @@ -287,8 +287,8 @@ slave_t* slave_create(hash_table_t* restrict wait_set, const char* restrict recv rc->wait_set = wait_set; rc->client = parse_client_id(recv_client_id); - fail_if (xstrdup(rc->client_id, recv_client_id)); - fail_if (xstrdup(rc->message_id, recv_message_id)); + fail_if (xstrdup_nn(rc->client_id, recv_client_id)); + fail_if (xstrdup_nn(rc->message_id, recv_message_id)); return rc; -- cgit v1.2.3-70-g09d2