diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-04-26 23:17:02 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-04-26 23:17:02 +0200 |
| commit | c07798feb5475b47562d6f9e90a564fc1121d25e (patch) | |
| tree | d7c9577a9974ff8f04b000278c3937b26096ed0a /src/zsetup.c | |
| parent | zzero1 did not guarantee that all arguments were evaulated exactly once, thus made static inline (diff) | |
| download | libzahl-c07798feb5475b47562d6f9e90a564fc1121d25e.tar.gz libzahl-c07798feb5475b47562d6f9e90a564fc1121d25e.tar.bz2 libzahl-c07798feb5475b47562d6f9e90a564fc1121d25e.tar.xz | |
Add, and use, libzahl_memfailure for conciseness, also fix possible unset errno
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zsetup.c')
| -rw-r--r-- | src/zsetup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/zsetup.c b/src/zsetup.c index e36bff3..212a1e9 100644 --- a/src/zsetup.c +++ b/src/zsetup.c @@ -45,11 +45,8 @@ zsetup(jmp_buf env) zinit(libzahl_tmp_divmod_ds[i]); libzahl_temp_stack = malloc(256 * sizeof(*libzahl_temp_stack)); - if (unlikely(!libzahl_temp_stack)) { - if (!errno) /* sigh... */ - errno = ENOMEM; - libzahl_failure(errno); - } + if (unlikely(!libzahl_temp_stack)) + libzahl_memfailure(); libzahl_temp_stack_head = libzahl_temp_stack; libzahl_temp_stack_end = libzahl_temp_stack + 256; } |
