public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Schmidt <will_schmidt@vnet.ibm.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Milton Miller <miltonm@bga.com>,
	u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org,
	trivial@kernel.org, Randy Dunlap <rdunlap@xenotime.net>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: trivial: make comment about vs{n,cn,}printf more understandable
Date: Wed, 24 Nov 2010 09:27:42 -0600	[thread overview]
Message-ID: <1290612462.3159.16.camel@lexx> (raw)
In-Reply-To: <1290568857.30543.442.camel@gandalf.stny.rr.com>

On Tue, 2010-11-23 at 22:20 -0500, Steven Rostedt wrote:
> 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()

Would be nice if we could lead with the "probably...", but I don't see a
clean way of doing that.    How about a blending of the two:

 * Call this function if you are dealing with a va_list, otherwise use
the scnprintf() function.


> 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 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 16:12 [PATCH] trivial: make comment about vs{n,cn,}printf more understandable Uwe Kleine-König
2010-11-24  3:04 ` Milton Miller
2010-11-24  3:20   ` Steven Rostedt
2010-11-24 15:27     ` Will Schmidt [this message]
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=1290612462.3159.16.camel@lexx \
    --to=will_schmidt@vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=rdunlap@xenotime.net \
    --cc=rostedt@goodmis.org \
    --cc=trivial@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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