From: Andre Noll Date: Tue, 17 Mar 2009 23:00:08 +0000 (+0100) Subject: GET_NUM_DIGITS: Evaluate macro parameter only once. X-Git-Tag: v0.3.4~29 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=e5e59d29676be79d4938e8871b46f12f6a5fca66 GET_NUM_DIGITS: Evaluate macro parameter only once. --- diff --git a/aft.c b/aft.c index 7bfad504..daa9c730 100644 --- a/aft.c +++ b/aft.c @@ -741,7 +741,7 @@ static int get_local_time(uint64_t *seconds, char *buf, size_t size, #define GET_NUM_DIGITS(x, num) { \ typeof((x)) _tmp = PARA_ABS(x); \ *num = 1; \ - if ((x)) \ + if ((_tmp)) \ while ((_tmp) > 9) { \ (_tmp) /= 10; \ (*num)++; \