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
3328 for (cnt = 0; opts[cnt].name; cnt++)3328 for (cnt = 0; opts[cnt].name; cnt++)
3329 ;3329 ;
3330 3330
3331 topts = kzalloc(sizeof(*topts) * (cnt + 1), GFP_KERNEL);3331 topts = kcalloc(cnt + 1, sizeof(*topts), GFP_KERNEL);
3332 if (!topts)3332 if (!topts)
3333 return NULL;3333 return NULL;
3334 3334