diff --git a/src/factor.c b/src/factor.c index 2649e9fc6..802c05e4f 100644 --- a/src/factor.c +++ b/src/factor.c @@ -318,16 +318,16 @@ static void factor (uintmax_t, uintmax_t, struct factors *); #endif #define rsh2(rh, rl, ah, al, cnt) \ - do { \ + if (cnt) { \ (rl) = ((ah) << (W_TYPE_SIZE - (cnt))) | ((al) >> (cnt)); \ (rh) = (ah) >> (cnt); \ - } while (0) + } else (void) 0 #define lsh2(rh, rl, ah, al, cnt) \ - do { \ + if (cnt) { \ (rh) = ((ah) << cnt) | ((al) >> (W_TYPE_SIZE - (cnt))); \ (rl) = (al) << (cnt); \ - } while (0) + } else (void) 0 #define ge2(ah, al, bh, bl) \ ((ah) > (bh) || ((ah) == (bh) && (al) >= (bl)))