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/zstr.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/zstr.c')
| -rw-r--r-- | src/zstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -63,7 +63,7 @@ zstr(z_t a, char *b) if (unlikely(zzero(a))) { if (unlikely(!b) && unlikely(!(b = malloc(2)))) - libzahl_failure(errno); + libzahl_memfailure(); b[0] = '0'; b[1] = 0; return b; @@ -72,7 +72,7 @@ zstr(z_t a, char *b) n = zstr_length(a, 10); if (unlikely(!b) && unlikely(!(b = malloc(n + 1)))) - libzahl_failure(errno); + libzahl_memfailure(); neg = znegative(a); zabs(num, a); |
