[pulseaudio-discuss] [PATCH] alsa: Turn one assertion into two

David Henningsson david.henningsson at canonical.com
Mon Sep 23 01:14:44 PDT 2013


On 09/23/2013 10:12 AM, Tanu Kaskinen wrote:
> On Mon, 2013-09-23 at 09:55 +0200, David Henningsson wrote:
>> According to coding style, one should have one assertion per line
>> and not combine assertions.
>>
>> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
>> ---
>>  src/modules/alsa/module-alsa-card.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
>> index 96e88e5..be982ed 100644
>> --- a/src/modules/alsa/module-alsa-card.c
>> +++ b/src/modules/alsa/module-alsa-card.c
>> @@ -378,8 +378,8 @@ static int report_jack_state(snd_hctl_elem_t *elem, unsigned int mask) {
>>                  pa_assert(port);
>>              }
>>              else {
>> -                pa_assert(jack->path && jack->path->port);
>> -                port = jack->path->port;
>> +                pa_assert(jack->path);
>> +                pa_assert_se(port = jack->path->port);
>>              }
>>              report_port_state(port, u);
>>          }
> 
> Ack.
> 

Thanks, pushed.


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list