LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "David J. Wilder" <dwilder@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, systemtap@sourceware.org,
	prasadav@us.ibm.com, hch@infradead.org
Subject: Re: [patch 2/3]  Trace code and documentation
Date: Thu, 28 Feb 2008 02:04:41 -0800	[thread overview]
Message-ID: <20080228020441.a08e4772.akpm@linux-foundation.org> (raw)
In-Reply-To: <1204065528.26964.17.camel@lc4eb748232119.ibm.com>

On Tue, 26 Feb 2008 14:38:48 -0800 "David J. Wilder" <dwilder@us.ibm.com> wrote:

> +	if (strncmp(buf, "start", strlen("start")) == 0) {
> +		ret = trace_start(trace);
> +		if (ret)
> +			return ret;
> +	} else if (strncmp(buf, "stop", strlen("stop")) == 0)
> +		trace_stop(trace);

Does gcc manage to avoid the pointless strlen() calls here?

It's a bit untidy that you can write "startfoo" in there and the kernel
will happily accept it.

  reply	other threads:[~2008-02-28 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 22:38 David J. Wilder
2008-02-28 10:04 ` Andrew Morton [this message]
2008-02-29 16:28   ` David Wilder
  -- strict thread matches above, loose matches on Subject: below --
2008-03-03 23:52 David J. Wilder
2007-11-13  1:02 David J. Wilder

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=20080228020441.a08e4772.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dwilder@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prasadav@us.ibm.com \
    --cc=systemtap@sourceware.org \
    --subject='Re: [patch 2/3]  Trace code and documentation' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).