Re: [dev] [st] [patch] misplaced parenthesis in LEN macro

From: Alexander Huemer <alexander.huemer_AT_xx.vu>
Date: Sun, 20 Apr 2014 13:53:33 +0200

Hi,

On Sun, Apr 20, 2014 at 03:41:40PM +0400, noname_AT_inventati.org wrote:
> […]
> -#define LEN(a) (sizeof(a) / sizeof(a[0]))
> +#define LEN(a) (sizeof(a) / sizeof(a)[0])
> […]

Why parenthesis anyway? a[0] is an expression, not a type, and there is
nothing to group here. sizeof is not a function!

Kind regards,
-Alex
Received on Sun Apr 20 2014 - 13:53:33 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 20 2014 - 14:00:08 CEST