lkml.org 
[lkml]   [2015]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: speakup: Fix warning of line over 80 characters.
On Sun, Jan 18, 2015 at 09:29:21AM +0100, Robin Schroer wrote:
> On Sat, Jan 17, 2015 at 11:57:53PM -0800, Shirish Gajera wrote:
> > diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> > index e9f0c15..141abb7 100644
> > --- a/drivers/staging/speakup/main.c
> > +++ b/drivers/staging/speakup/main.c
> > @@ -422,8 +422,10 @@ static void announce_edge(struct vc_data *vc, int msg_id)
> > {
> > if (spk_bleeps & 1)
> > bleep(spk_y);
> > - if ((spk_bleeps & 2) && (msg_id < edge_quiet))
> > - synth_printf("%s\n", spk_msg_get(MSG_EDGE_MSGS_START + msg_id - 1));
> > + if ((spk_bleeps & 2) && (msg_id < edge_quiet)) {
> > + synth_printf("%s\n",
> > + spk_msg_get(MSG_EDGE_MSGS_START + msg_id - 1));
> > + }
> > }
> >
> You do not actually need to add the braces as this remains a single
> statement (mnemonic: without braces the if ends at the first semicolon).
>

In staging (and most other trees), we prefer that the curly braces be
there for multi-line indents. It makes it more readable.

regards,
dan carpenter



\
 
 \ /
  Last update: 2015-01-19 13:41    [W:0.059 / U:5.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site