mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Remove assert from header files
Putting assert in the public macros isn't good idea at all. Let's get rid of them. Also, clean up snd*_alloca() functions to use a helper macro instead of copy and paste.
This commit is contained in:
parent
9eb272c753
commit
68e5771a6f
11 changed files with 43 additions and 53 deletions
|
|
@ -146,7 +146,7 @@ size_t snd_mixer_class_sizeof(void);
|
|||
* \brief allocate an invalid #snd_mixer_class_t using standard alloca
|
||||
* \param ptr returned pointer
|
||||
*/
|
||||
#define snd_mixer_class_alloca(ptr) do { assert(ptr); *ptr = (snd_mixer_class_t *) alloca(snd_mixer_class_sizeof()); memset(*ptr, 0, snd_mixer_class_sizeof()); } while (0)
|
||||
#define snd_mixer_class_alloca(ptr) __snd_alloca(ptr, snd_mixer_class)
|
||||
int snd_mixer_class_malloc(snd_mixer_class_t **ptr);
|
||||
void snd_mixer_class_free(snd_mixer_class_t *obj);
|
||||
void snd_mixer_class_copy(snd_mixer_class_t *dst, const snd_mixer_class_t *src);
|
||||
|
|
@ -294,7 +294,7 @@ size_t snd_mixer_selem_id_sizeof(void);
|
|||
* \brief allocate an invalid #snd_mixer_selem_id_t using standard alloca
|
||||
* \param ptr returned pointer
|
||||
*/
|
||||
#define snd_mixer_selem_id_alloca(ptr) do { assert(ptr); *ptr = (snd_mixer_selem_id_t *) alloca(snd_mixer_selem_id_sizeof()); memset(*ptr, 0, snd_mixer_selem_id_sizeof()); } while (0)
|
||||
#define snd_mixer_selem_id_alloca(ptr) __snd_alloca(ptr, snd_mixer_selem_id)
|
||||
int snd_mixer_selem_id_malloc(snd_mixer_selem_id_t **ptr);
|
||||
void snd_mixer_selem_id_free(snd_mixer_selem_id_t *obj);
|
||||
void snd_mixer_selem_id_copy(snd_mixer_selem_id_t *dst, const snd_mixer_selem_id_t *src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue