[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080228020441.a08e4772.akpm@linux-foundation.org>
Date: Thu, 28 Feb 2008 02:04:41 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "David J. Wilder" <dwilder@...ibm.com>
Cc: linux-kernel@...r.kernel.org, systemtap@...rceware.org,
prasadav@...ibm.com, hch@...radead.org
Subject: Re: [patch 2/3] Trace code and documentation
On Tue, 26 Feb 2008 14:38:48 -0800 "David J. Wilder" <dwilder@...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.
--
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