diff mbox

[v2] trivial: sound/core/seq/seq_memory.c: Fix closing brace followed by if

Message ID 1403538969-26147-1-git-send-email-linux@rasmusvillemoes.dk (mailing list archive)
State Accepted
Commit b245a822a45915f63197d81cb899132e78f29fd8
Headers show

Commit Message

Rasmus Villemoes June 23, 2014, 3:56 p.m. UTC
Add a newline and, while at it, remove a space and redundant braces.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 sound/core/seq/seq_memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Takashi Iwai June 23, 2014, 4 p.m. UTC | #1
At Mon, 23 Jun 2014 17:56:09 +0200,
Rasmus Villemoes wrote:
> 
> Add a newline and, while at it, remove a space and redundant braces.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Thanks, applied now.

I usually don't take patches that only do coding style fixes unless
any further real fixes follow, but this case looks like an exception:
the placement of if is actually wrong so it's worth to correct
(although the code could be "else if" there).


Takashi

> ---
>  sound/core/seq/seq_memory.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
> index 1e206de..ba8e4a6 100644
> --- a/sound/core/seq/seq_memory.c
> +++ b/sound/core/seq/seq_memory.c
> @@ -101,9 +101,9 @@ int snd_seq_dump_var_event(const struct snd_seq_event *event,
>  			len -= size;
>  		}
>  		return 0;
> -	} if (! (event->data.ext.len & SNDRV_SEQ_EXT_CHAINED)) {
> -		return func(private_data, event->data.ext.ptr, len);
>  	}
> +	if (!(event->data.ext.len & SNDRV_SEQ_EXT_CHAINED))
> +		return func(private_data, event->data.ext.ptr, len);
>  
>  	cell = (struct snd_seq_event_cell *)event->data.ext.ptr;
>  	for (; len > 0 && cell; cell = cell->next) {
> -- 
> 1.9.2
>
diff mbox

Patch

diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index 1e206de..ba8e4a6 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -101,9 +101,9 @@  int snd_seq_dump_var_event(const struct snd_seq_event *event,
 			len -= size;
 		}
 		return 0;
-	} if (! (event->data.ext.len & SNDRV_SEQ_EXT_CHAINED)) {
-		return func(private_data, event->data.ext.ptr, len);
 	}
+	if (!(event->data.ext.len & SNDRV_SEQ_EXT_CHAINED))
+		return func(private_data, event->data.ext.ptr, len);
 
 	cell = (struct snd_seq_event_cell *)event->data.ext.ptr;
 	for (; len > 0 && cell; cell = cell->next) {