From ec7d302d1243df0e252d54a940e47f9d91784d66 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 7 May 2014 22:19:45 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-server.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/mds-server.c') diff --git a/src/mds-server.c b/src/mds-server.c index 6476fb5..932e7ea 100644 --- a/src/mds-server.c +++ b/src/mds-server.c @@ -785,13 +785,10 @@ void add_intercept_condition(client_t* client, char* condition, int64_t priority client->interception_conditions = NULL; } else - { - conds = realloc(conds, n * sizeof(interception_condition_t)); - if (conds == NULL) - perror(*argv); - else - client->interception_conditions = conds; - } + if ((conds = realloc(conds, n * sizeof(interception_condition_t))) == NULL) + perror(*argv); + else + client->interception_conditions = conds; } else { @@ -1462,8 +1459,7 @@ int unmarshal_server(int fd) if (value->interception_conditions != NULL) { for (j = 0; j < n; j++) - if (value->interception_conditions[j].condition != NULL) - free(value->interception_conditions[j].condition); + free(value->interception_conditions[j].condition); free(value->interception_conditions); } free(value); -- cgit v1.2.3-70-g09d2