[alsa-devel] [alsa-lib][PATCH] ctl: use condition statements instead of assert() for new APIs to add an element set
Takashi Iwai
tiwai at suse.de
Wed Jul 20 14:32:40 CEST 2016
On Wed, 20 Jul 2016 11:58:52 +0200,
Takashi Sakamoto wrote:
>
> Usage of assert() is not better practice of programming as shared library
> APIs. They should return appropriate error code to promote applications to
> handle error state.
>
> This commit applies condition statements with return value of -EINVAL,
> instead of assert(). As a backward compatibility for existent applications,
> old APIs still call assert().
>
> Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
Applied, thanks.
Takashi
More information about the Alsa-devel
mailing list