diff --git a/ChangeLog b/ChangeLog index 38d313e9281ab505821d09e23a966f6c10d2591d..d069e75addeca783d4455f60652433b6a310bb2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-04-16 Niels Möller <nisse@lysator.liu.se> + + * macros.h (INCREMENT): Allow size == 1. + 2013-04-15 Niels Möller <nisse@lysator.liu.se> * x86_64/umac-nh.asm: New file. 4.4 time speedup. diff --git a/macros.h b/macros.h index ee2060431d6d2f0dcde6ea69b55b9ccfb74f2ba2..38b9e2198152a393ca92907487b0c718bda582f6 100644 --- a/macros.h +++ b/macros.h @@ -145,16 +145,14 @@ do { \ #define ROTL64(n,x) (((x)<<(n)) | ((x)>>(64-(n)))) -/* Requires that size >= 2 */ +/* Requires that size > 0 */ #define INCREMENT(size, ctr) \ do { \ unsigned increment_i = (size) - 1; \ if (++(ctr)[increment_i] == 0) \ - { \ - while (++(ctr)[--increment_i] == 0 \ - && increment_i > 0) \ - ; \ - } \ + while (increment_i > 0 \ + && ++(ctr)[--increment_i] == 0 ) \ + ; \ } while (0)