[MPlayer-cvslog] r21218 - trunk/stream/freesdp/parser.c

Rich Felker dalias at aerifal.cx
Mon Nov 27 09:10:18 CET 2006


On Sat, Nov 25, 2006 at 02:39:22PM +0100, reimar wrote:
> Author: reimar
> Date: Sat Nov 25 14:39:21 2006
> New Revision: 21218
> 
> Modified:
>    trunk/stream/freesdp/parser.c
> 
> Log:
> spurious () like in ({code;}) probably is not valid C, icc 9, definitely
> will not compile it, and whatever it is supposed to be good for it
> does not seem to be needed.
> 
> 
> Modified: trunk/stream/freesdp/parser.c
> ==============================================================================
> --- trunk/stream/freesdp/parser.c	(original)
> +++ trunk/stream/freesdp/parser.c	Sat Nov 25 14:39:21 2006
> @@ -44,7 +44,7 @@
>   * (not followed by a '\n') is found, returns
>   */
>  #define NEXT_LINE(c)                                                \
> -({                                                                  \
> +{                                                                   \
>   while ((*(c) != '\0') && (*(c) != '\r') && (*(c) != '\n')) {       \
>      (c)++;                                                          \
>   }                                                                  \
> @@ -58,7 +58,7 @@
>         return FSDPE_ILLEGAL_CHARACTER;                              \
>     }                                                                \
>   }                                                                  \
> -})
> +}

don't use { ... } but instead do { ... } while(0). the former will 
misbehave if you do something like if (foo) MACRO(); else ...

rich





More information about the MPlayer-cvslog mailing list