aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsserver
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-27 15:24:16 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-27 15:24:16 +0200
commit472831d2dd6f4d9f0926790e68eea69902251591 (patch)
tree348655f7aca6a8672d963723d8b07476a3ef5849 /src/libmdsserver
parentwell, that was unnecessary (diff)
downloadmds-472831d2dd6f4d9f0926790e68eea69902251591.tar.gz
mds-472831d2dd6f4d9f0926790e68eea69902251591.tar.bz2
mds-472831d2dd6f4d9f0926790e68eea69902251591.tar.xz
return -1 not 1 on failure
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libmdsserver')
-rw-r--r--src/libmdsserver/fd-table.c8
1 files changed, 4 insertions, 4 deletions
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);