lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0904161151001.20429@gandalf.stny.rr.com>
Date:	Thu, 16 Apr 2009 11:51:20 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/5] tracing/events: add startup tests for events



On Thu, 16 Apr 2009, Frederic Weisbecker wrote:
> > +	sysname = kmalloc(4, GFP_KERNEL);
> > +	if (WARN_ON(!sysname)) {
> > +		pr_warning("Can't allocate memory, giving up!\n");
> > +		return 0;
> > +	}
> > +	memcpy(sysname, "*:*", 4);
> > +	ret = ftrace_set_clr_event(sysname, 1);
> > +	if (WARN_ON_ONCE(ret)) {
> > +		kfree(sysname);
> > +		pr_warning("error enabling all events\n");
> > +		return 0;
> > +	}
> > +
> > +	event_test_stuff();
> > +
> > +	/* reset sysname */
> > +	memcpy(sysname, "*:*", 4);
> 
> 
> 
> Nano thing, because you are using it twice:
> Why not strcpy?
> 

Because cut and paste was so much easier ;-)

-- Steve

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ