lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 30 Mar 2015 10:23:00 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Richard Weinberger <richard.weinberger@...il.com>
Cc:	Shirish Gajera <gshirishfree@...il.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	kirk@...sers.ca, Rusty Russell <rusty@...tcorp.com.au>,
	vthakkar1994@...il.com, Greg KH <gregkh@...uxfoundation.org>,
	DaeSeok Youn <daeseok.youn@...il.com>,
	Robin Schroer <sulamiification@...il.com>,
	speakup@...ux-speakup.org,
	Ayşe Melike Yurtoğlu 
	<aysemelikeyurtoglu@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Ben Hutchings <ben@...adent.org.uk>,
	Domagoj Tršan <domagoj.trsan@...il.com>,
	roxanagabriela10@...il.com, tapaswenipathak@...il.com,
	samuel.thibault@...-lyon.org, dilekuzulmez@...il.com,
	chris@...-brannons.com
Subject: Re: [PATCH] staging: speakup: Fix warning of line over 80 characters.

On Sat, Mar 28, 2015 at 09:40:05PM +0100, Richard Weinberger wrote:
> > diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> > index 1249f91..c955976 100644
> > --- a/drivers/staging/speakup/main.c
> > +++ b/drivers/staging/speakup/main.c
> > @@ -423,7 +423,8 @@ 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));
> > +               synth_printf("%s\n",
> > +                       spk_msg_get(MSG_EDGE_MSGS_START + msg_id - 1));
> 
> Instead of blindly adding newlines to silence checkpatch.pl, what
> about reworking the code?
> printf("%s\n", ..) cries for a puts().


printf is fine.  Not everything has to be a massive engineering project
which supports every method in the world.

> 
> >  }
> >
> >  static void speak_char(u_char ch)
> > @@ -1131,7 +1132,8 @@ static void spkup_write(const char *in_buf, int count)
> >         if (in_count > 2 && rep_count > 2) {
> >                 if (last_type & CH_RPT) {
> >                         synth_printf(" ");
> > -                       synth_printf(spk_msg_get(MSG_REPEAT_DESC2), ++rep_count);
> > +                       synth_printf(spk_msg_get(MSG_REPEAT_DESC2),
> > +                                       ++rep_count);
> >                         synth_printf(" ");
> 
> This printf stuff looks odd. synth_printf() seems to take a format
> string, in this case the format string
> is returned by spk_msg_get(), smells like a format string bug.

It's not a bug, but it's definitely odd.  I think the reason they did it
that way is so they can translate the output to other languages.

Anyway, this patch is basically fine.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ