History

tracing: replace kzalloc with kcalloc

Impact: clean up kcalloc is a better approach to allocate a NULL array.

Steven Rostedt committed 17 years ago

Commit 0cfe8241 parent 5c6a3ae1 file · +1 −1Browse files

Unified · Split

kernel/trace/trace.c+1−1
@@ -3328,7 +3328,7 @@ create_trace_option_files(struct tracer *tracer) · 3327 unmodified lines
33283328 for (cnt = 0; opts[cnt].name; cnt++)
33293329 ;
33303330
3331− topts = kzalloc(sizeof(*topts) * (cnt + 1), GFP_KERNEL);
3331+ topts = kcalloc(cnt + 1, sizeof(*topts), GFP_KERNEL);
33323332 if (!topts)
33333333 return NULL;
33343334