From: Zhao Hongjiang Date: Thu, 20 Jun 2013 11:05:40 +0000 (+0800) Subject: tracing: Change trace event sample to use strlcpy instead of strncpy X-Git-Tag: omap-for-v3.17/fixes-against-rc2~186^2~52 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8fae2f64433cbe7f0389f965081348272b61ff9;p=pandora-kernel.git 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 Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed