aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server/interception-condition.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-08 22:39:07 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-08 22:39:07 +0100
commit2064b68718ea5f15de76d661ae1f307d67a0cf26 (patch)
tree3b8f93932cb4a13ab6001f165de7714ec7e86848 /src/mds-server/interception-condition.c
parentupdate the texinfo manual for the new use of fail_if (diff)
downloadmds-2064b68718ea5f15de76d661ae1f307d67a0cf26.tar.gz
mds-2064b68718ea5f15de76d661ae1f307d67a0cf26.tar.bz2
mds-2064b68718ea5f15de76d661ae1f307d67a0cf26.tar.xz
with a few exceptions and some remaining files, never return directly on failure, always goto fail by invoking fail_if
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-server/interception-condition.c')
-rw-r--r--src/mds-server/interception-condition.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mds-server/interception-condition.c b/src/mds-server/interception-condition.c
index 31905c9..cfe5d0c 100644
--- a/src/mds-server/interception-condition.c
+++ b/src/mds-server/interception-condition.c
@@ -71,10 +71,11 @@ size_t interception_condition_unmarshal(interception_condition_t* restrict this,
buf_get_next(data, int64_t, this->priority);
buf_get_next(data, int, this->modifying);
n = (strlen(data) + 1) * sizeof(char);
- if ((this->condition = malloc(n)) == NULL)
- return 0;
+ fail_if ((this->condition = malloc(n)) == NULL);
memcpy(this->condition, data, n);
return sizeof(size_t) + sizeof(int64_t) + 2 * sizeof(int) + n;
+ fail:
+ return 0;
}