From ef6bf64a3c9139ff1f1b2dce45f91cf826067a33 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 26 Apr 2016 23:10:15 +0200 Subject: zzero1 did not guarantee that all arguments were evaulated exactly once, thus made static inline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/internals.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/internals.h b/src/internals.h index 3ee7bd3..6454a21 100644 --- a/src/internals.h +++ b/src/internals.h @@ -111,7 +111,6 @@ extern struct zahl **libzahl_temp_stack_end; #define zpositive(a) (zsignum(a) > 0) #define zpositive1(a, b) (zpositive(a) + zpositive(b) > 0) #define zpositive2(a, b) (zsignum(a) + zsignum(b) == 2) -#define zzero1(a, b) (zzero(a) || zzero(b)) #define zzero2(a, b) (!(zsignum(a) | zsignum(b))) #define zmemmove(d, s, n) memmove((d), (s), (n) * sizeof(zahl_char_t)) @@ -119,6 +118,12 @@ void libzahl_realloc(z_t a, size_t need); void zmul_impl(z_t a, z_t b, z_t c); void zsqr_impl(z_t a, z_t b); +static inline int +zzero1(z_t a, z_t b) +{ + return zzero(a) || zzero(b); +} + static void libzahl_failure(int error) { -- cgit v1.2.3-70-g09d2