lkml.org 
[lkml]   [2008]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/3] Trace code and documentation
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.


\
 
 \ /
  Last update: 2008-02-28 11:09    [W:0.075 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site