aboutsummaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-12-05 10:15:16 +0000
committerMark Brown <broonie@linaro.org>2013-12-05 10:15:16 +0000
commitdffe2a3eed105c631500778dfaba0998d7bf8512 (patch)
tree4c2492d710e0b101f57a7f399b3e891129b1c8b4 /include/trace
parent3b21b35761de8348dd2f7cff9752449281d7a17b (diff)
parent538069756ce13f9d0e0ccb7a17b6935a0bfb7cad (diff)
Merge tag 'v3.10.22' into linux-linaro-lsk
This is the 3.10.22 stable release
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/ftrace.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 19edd7facaa..66dba42128d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -368,7 +368,8 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
__data_size += (len) * sizeof(type);
#undef __string
-#define __string(item, src) __dynamic_array(char, item, strlen(src) + 1)
+#define __string(item, src) __dynamic_array(char, item, \
+ strlen((src) ? (const char *)(src) : "(null)") + 1)
#undef DECLARE_EVENT_CLASS
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -498,7 +499,7 @@ static inline notrace int ftrace_get_offsets_##call( \
#undef __assign_str
#define __assign_str(dst, src) \
- strcpy(__get_str(dst), src);
+ strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)");
#undef TP_fast_assign
#define TP_fast_assign(args...) args