2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/samples/trace_events
Zhao Hongjiang d8fae2f644 tracing: Change trace event sample to use strlcpy instead of strncpy
Strings should be copied with strlcpy instead of strncpy when they will
later be printed via %s. This guarantees that they terminate with a
NUL '\0' character and do not run pass the end of the allocated string.

This is only for sample code, but it should stil represent a good
role model.

Link: http://lkml.kernel.org/p/51C2E204.1080501@huawei.com

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-07-01 07:13:33 -04:00
..
Makefile tracing: update sample event documentation 2009-06-16 19:53:07 -04:00
trace-events-sample.c tracing/events: don't say hi when loading the trace event sample 2009-05-06 10:38:18 +02:00
trace-events-sample.h tracing: Change trace event sample to use strlcpy instead of strncpy 2014-07-01 07:13:33 -04:00