Re: Kill snd_assert()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Aug 2008, Takashi Iwai wrote:

> Hi,
> 
> as some people already mentioned, we have a pretty ugly macro, snd_assert().
> Actually, this macro is sometimes useful, but the implementation including
> the code flow in arguments is really bad.
>
> I tried to kill this, either the following way:
> 
>  - replace
> 	snd_assert(cond, flow...);
>    with
> 	if (snd_BUG_ON(!cond))
> 		flow...;

For my eyes, many uses of snd_assert with direct 'return VALUE' are more
"sexy", easy understandable and smaller. But, as mentioned, when goto is
used to change the code flow, we end up with a compiler warning. It should 
be eliminated.

I have no strong objections to accept this change as you proposed. Thank 
you for your work.

					Jaroslav

-----
Jaroslav Kysela <perex@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux