Re: Using ARRAY_SIZE macro when setting up ASoC audio map?

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

 



On Wed, 27 Feb 2008 17:15:49 +0100
"ext Takashi Iwai" <tiwai@xxxxxxx> wrote:

> >  	/* Set up spitz specific audio path audio_map */
> > -	for (i = 0; audio_map[i][0] != NULL; i++) {
> > +	for (i = 0; i < ARRAY_SIZE(audio_map); i++) {
> 
> Does ARRAY_SIZE() work with two-dimensional arrays?  Just wondering...
> 
Yes it does when counting number of rows since sizeof(arr[0])
operator in ARRAY_SIZE returns a row size in bytes when used with
two-dimensional array.

-- 
Jarkko
_______________________________________________
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