aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server/multicast.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-09 13:15:10 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-09 13:15:10 +0100
commit7a994c9631c590d6a73c842fa5d2d3567b4771dd (patch)
tree228ade01f99ba217151a0ed20f29c5f3a5028619 /src/mds-server/multicast.c
parentmds-kbdc: compile-layout: macro_call: fix bug: do not duplicate the arguments if there are none (diff)
parentreport an error, rather than causing failure the caller but not for the called function (diff)
downloadmds-7a994c9631c590d6a73c842fa5d2d3567b4771dd.tar.gz
mds-7a994c9631c590d6a73c842fa5d2d3567b4771dd.tar.bz2
mds-7a994c9631c590d6a73c842fa5d2d3567b4771dd.tar.xz
merge track-errors and resolve conflict
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-server/multicast.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mds-server/multicast.c b/src/mds-server/multicast.c
index 7a0b309..c3d09bc 100644
--- a/src/mds-server/multicast.c
+++ b/src/mds-server/multicast.c
@@ -124,8 +124,7 @@ size_t multicast_unmarshal(multicast_t* restrict this, char* restrict data)
buf_get_next(data, size_t, this->message_ptr);
buf_get_next(data, size_t, this->message_prefix);
if (this->interceptions_count > 0)
- if (xmalloc(this->interceptions, this->interceptions_count, queued_interception_t))
- return 0;
+ fail_if (xmalloc(this->interceptions, this->interceptions_count, queued_interception_t));
for (i = 0; i < this->interceptions_count; i++)
{
n = queued_interception_unmarshal(this->interceptions + i, data);
@@ -134,12 +133,13 @@ size_t multicast_unmarshal(multicast_t* restrict this, char* restrict data)
}
if (this->message_length > 0)
{
- if (xmalloc(this->message, this->message_length, char))
- return 0;
+ fail_if (xmalloc(this->message, this->message_length, char));
memcpy(this->message, data, this->message_length * sizeof(char));
rc += this->message_length * sizeof(char);
}
return rc;
+ fail:
+ return 0;
}