From 472831d2dd6f4d9f0926790e68eea69902251591 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 27 Apr 2014 15:24:16 +0200 Subject: return -1 not 1 on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libmdsserver/fd-table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libmdsserver') diff --git a/src/libmdsserver/fd-table.c b/src/libmdsserver/fd-table.c index f85d5f5..78876ce 100644 --- a/src/libmdsserver/fd-table.c +++ b/src/libmdsserver/fd-table.c @@ -48,11 +48,11 @@ int fd_table_create_tuned(fd_table_t* restrict this, size_t initial_capacity) bitcap = (this->capacity + 63) / 64; this->used = calloc(bitcap, sizeof(size_t)); if (this->used == NULL) - return 1; + return -1; this->values = calloc(this->capacity, sizeof(size_t)); if (this->values == NULL) - return 1; + return -1; return 0; } @@ -301,12 +301,12 @@ int fd_table_unmarshal(fd_table_t* restrict this, char* restrict data, remap_fun this->values = malloc(this->capacity * sizeof(size_t)); if (this->values == NULL) - return 1; + return -1; bitcap = (this->capacity + 63) / 64; this->used = malloc(bitcap * sizeof(size_t)); if (this->used == NULL) - return 1; + return -1; memcpy(this->values, data, this->capacity * sizeof(size_t)); data += this->capacity * sizeof(size_t) / sizeof(char); -- cgit v1.2.3-70-g09d2