This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [patch 2/3] Trace code and documentation
- From: Andrew Morton <akpm at linux-foundation dot org>
- To: "David J. Wilder" <dwilder at us dot ibm dot com>
- Cc: linux-kernel at vger dot kernel dot org, systemtap at sourceware dot org, prasadav at us dot ibm dot com, hch at infradead dot org
- Date: Thu, 28 Feb 2008 02:04:41 -0800
- Subject: Re: [patch 2/3] Trace code and documentation
- References: <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.