X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Ftrace%2Fftrace.h;h=763bf05ccb27427fad7483690f0f325ebb90cb49;hp=769724944fc60ccbbb2fcab4d03a6fe832fe679e;hb=53fd7f912c0877647d6a1e1877f5ea8535ee0b4a;hpb=02ebbbd481635fd3ce7018e5bb19c18c0f1e4561 diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 769724944fc6..763bf05ccb27 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -379,7 +379,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) \ @@ -504,7 +505,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