mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Milton Miller <miltonm@bga.com>
Cc: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org,
	trivial@kernel.org, Will Schmidt <will_schmidt@vnet.ibm.com>,
	Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: trivial: make comment about vs{n,cn,}printf more understandable
Date: Tue, 23 Nov 2010 22:20:57 -0500	[thread overview]
Message-ID: <1290568857.30543.442.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1290567844_20137@mail4.comsite.net>

On Tue, 2010-11-23 at 21:04 -0600, Milton Miller wrote:
> On Tue, 23 Nov 2010 at about 16:12:45 -0000, Uwe Kleine-König wrote:
> > 
> > "You probably want ... instead." sounds like a recommendation better
> > not to use the v... functions.
> > 
> 
> Which is true, if you dont' have a va_list its hard to get them.
> But I do get your point.
> 
> >   * the @buf not including the trailing '\0'. If @size is <= 0 the function
> >   * returns 0.
> >   *
> > - * Call this function if you are already dealing with a va_list.
> > - * You probably want scnprintf() instead.
> > + * If you're not already dealing with a va_list better use scnprintf().
> 
> That doesn't flow off my (mid-western usa) tounge.
> 
> How about
>  * Call this function if you are already dealing with a va_list.
>  * Otherwise you probably want to use scnprintf().

This is closer to what he asked us on IRC ;-)

But a "do X if Y" is more perl syntax than English (IMHO).


> 
> Alternatively,
>  * If you're not already dealing with a va_list consider scnprintf().

This isn't bad. My recommendation I gave him was:

 * If you are already dealing with a va_list, then call this function.
 * Otherwise you probably want to use scnprintf()

But my upstate NY tongue may not be the best judgment here.

-- Steve

"When people ask me what language my mother tongue is, I simply reply 'C'"




  reply	other threads:[~2010-11-24  3:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 16:12 [PATCH] " Uwe Kleine-König
2010-11-24  3:04 ` Milton Miller
2010-11-24  3:20   ` Steven Rostedt [this message]
2010-11-24 15:27     ` Will Schmidt
2010-11-24 19:10   ` [PATCH v2] " Uwe Kleine-König
2011-04-06 14:34     ` Uwe Kleine-König
2011-04-06 14:37       ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290568857.30543.442.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=rdunlap@xenotime.net \
    --cc=trivial@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=will_schmidt@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®