From: Takashi Iwai Subject: Re: [alsa-cvslog] CVS: alsa-kernel/core/oss mixer_oss.c,1.38,1.39 Date: Wed, 09 Mar 2005 10:36:39 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Clemens Ladisch Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 9 Mar 2005 10:20:58 +0100 (MET), Clemens Ladisch wrote: > > Takashi Iwai wrote: > > Clemens Ladisch wrote: > > > Summary: fix forgotten release of semaphore in error path > > > > > > In snd_mixer_oss_get_volume1_vol and snd_mixer_oss_put_volume1_vol, > > > card->controls_rwsem wouldn't be released if the boolean type > > > check fails. > > > ... > > > - snd_runtime_check(uinfo->type != SNDRV_CTL_ELEM_TYPE_BOOLEAN || uinfo->value.integer.min != 0 || uinfo->value.integer.max != 1, return); > > > + snd_runtime_check(uinfo->type != SNDRV_CTL_ELEM_TYPE_BOOLEAN || uinfo->value.integer.min != 0 || uinfo->value.integer.max != 1, goto __unalloc); > > > > IMO, it'd be better to use a plain if() rather than this macro. > > It lowers readability. > > Yes, these lines are too long. > > I made the minimal change to make it correct, just to be sure. Feel > free to change it any way you want. :-) Hehe, I'm a broad-minded man, glad to give you a chance, too ;) > BTW: are there any plans to enforce the 80 columns limit of Linux > source code? ;-) Let's apply "indent -kr -i8 -l80" for all files :) Well, the problem of snd_runtime_check() is not its length but that it prevents to understand the code flow, just as you found in thie case. Takashi ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click