diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-05 21:26:44 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-05 21:26:44 +0200 |
commit | 20e81300c63e41c3fc8bf7dea6f5438fcf92da55 (patch) | |
tree | 922342e6439f90ccd4e186a5a703314630d5ff17 /src/servers | |
parent | Fix memory leak (diff) | |
download | coopgammad-20e81300c63e41c3fc8bf7dea6f5438fcf92da55.tar.gz coopgammad-20e81300c63e41c3fc8bf7dea6f5438fcf92da55.tar.bz2 coopgammad-20e81300c63e41c3fc8bf7dea6f5438fcf92da55.tar.xz |
typo + state dumping
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/servers/coopgamma.c | 8 | ||||
-rw-r--r-- | src/servers/master.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/servers/coopgamma.c b/src/servers/coopgamma.c index 26b000d..4e126cf 100644 --- a/src/servers/coopgamma.c +++ b/src/servers/coopgamma.c @@ -188,6 +188,10 @@ static ssize_t add_filter(struct output* restrict out, struct filter* restrict f memmove(out->table_sums + i + 1, out->table_sums + i, (n - i) * sizeof(*(out->table_sums))); out->table_size++; + out->table_filters[i] = *filter; + filter->class = NULL; + filter->ramps = NULL; + COPY_RAMP_SIZES(&(out->table_sums[i].u8), out); switch (out->depth) { @@ -203,10 +207,6 @@ static ssize_t add_filter(struct output* restrict out, struct filter* restrict f if (r < 0) return -1; - out->table_filters[i] = *filter; - filter->class = NULL; - filter->ramps = NULL; - return (ssize_t)i; } diff --git a/src/servers/master.c b/src/servers/master.c index acd0f6b..01b9bb5 100644 --- a/src/servers/master.c +++ b/src/servers/master.c @@ -128,7 +128,7 @@ static int dispatch_message(size_t conn, struct message* restrict msg) * * @param fds Reference parameter for the array of file descriptors * @param fdn Output parameter for the number of file descriptors - * @parma fds_alloc Reference parameter for the allocation size of `fds`, in elements + * @param fds_alloc Reference parameter for the allocation size of `fds`, in elements * @return Zero on success, -1 on error */ static int update_fdset(struct pollfd** restrict fds, nfds_t* restrict fdn, nfds_t* restrict fds_alloc) |