mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
cleanup: Use uint*_t instead of u_int*_t everythwere
Use the standard uint{8,16,32,64}_t everywhere instead of the
non-standard u_int{8,16,32,64}_t.
This changes the types in the public headers and removes the u_int*_t
defines. This may break things. However, indentifiers ending with _t are
reserved by POSIX[1]; defining those can lead to undefined behavior.
So if you rely on alsa-lib defining those for you, then you want the
compiler to error so things can be fixed properly.
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
885c64bcc4
commit
adab355f35
11 changed files with 146 additions and 156 deletions
|
|
@ -29,7 +29,7 @@
|
|||
#define MASK_OFS(i) ((i) >> 5)
|
||||
#define MASK_BIT(i) (1U << ((i) & 31))
|
||||
|
||||
MASK_INLINE unsigned int ld2(u_int32_t v)
|
||||
MASK_INLINE unsigned int ld2(uint32_t v)
|
||||
{
|
||||
unsigned r = 0;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ MASK_INLINE unsigned int ld2(u_int32_t v)
|
|||
return r;
|
||||
}
|
||||
|
||||
MASK_INLINE unsigned int hweight32(u_int32_t v)
|
||||
MASK_INLINE unsigned int hweight32(uint32_t v)
|
||||
{
|
||||
v = (v & 0x55555555) + ((v >> 1) & 0x55555555);
|
||||
v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
|
||||
|
|
@ -75,7 +75,7 @@ MASK_INLINE void snd_mask_none(snd_mask_t *mask)
|
|||
|
||||
MASK_INLINE void snd_mask_any(snd_mask_t *mask)
|
||||
{
|
||||
memset(mask, 0xff, MASK_SIZE * sizeof(u_int32_t));
|
||||
memset(mask, 0xff, MASK_SIZE * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
MASK_INLINE int snd_mask_empty(const snd_mask_t *mask)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue