]> git.alsa-project.org Git - alsa-lib.git/commit
ctl: use condition statements instead of assert() for new APIs to add an element set
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 20 Jul 2016 09:58:52 +0000 (18:58 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 20 Jul 2016 12:32:14 +0000 (14:32 +0200)
commitdf43c2d38047a6dd625e20b97ca6efb4fb0120a3
tree7cfd3789c2be642461ed7e2f7371de3ff63ae3e6
parent9797e9893093dbbde9745faad5163c93be3ca3a6
ctl: use condition statements instead of assert() for new APIs to add an element set

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@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/control/control.c