aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-registry/registry.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-08 18:18:33 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-08 18:18:33 +0100
commitece181226cd2d13585e09d708bfa679874ceee1a (patch)
tree1c16fb9dbd5cd64adae230a248cdc7aa90cd34a1 /src/mds-registry/registry.c
parentreplace all goto pfail with fail_if, so that we can take whence it failed (diff)
downloadmds-ece181226cd2d13585e09d708bfa679874ceee1a.tar.gz
mds-ece181226cd2d13585e09d708bfa679874ceee1a.tar.bz2
mds-ece181226cd2d13585e09d708bfa679874ceee1a.tar.xz
replace all variants of goto pfail with fail_if
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-registry/registry.c')
-rw-r--r--src/mds-registry/registry.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mds-registry/registry.c b/src/mds-registry/registry.c
index 89f1d80..8b1c126 100644
--- a/src/mds-registry/registry.c
+++ b/src/mds-registry/registry.c
@@ -225,19 +225,18 @@ static int registry_action_act(char* command, int action, uint64_t client, hash_
else if ((action == 0) && !has_key)
{
/* Add protocl to wait set of not present in the protocol table. */
- if ((command = strdup(command)) == NULL)
- goto pfail_wait;
+ fail_if ((command = strdup(command)) == NULL);
command_key = (size_t)(void*)command;
if (hash_table_put(wait_set, command_key, 1) == 0)
if (errno)
{
free(command);
- goto pfail_wait;
+ fail_if (1);
}
}
return 0;
- pfail_wait:
+ pfail:
xperror(*argv);
hash_table_destroy(wait_set, (free_func*)reg_table_free_key, NULL);
free(wait_set);