y@xxxxxxx writes: > From: Matthieu Moy <Matthieu.Moy@xxxxxxx> > > The common > > void function() { > struct wt_status_state *state = calloc(...); > ... > free(state); > } > > is essentially a less efficient, and more error prone way of allocating a > variable on the stack (plus, the calloc should have been a xcalloc). > Replace it with an on-stack variable. > > While we're there, also replace the individual initializations of fields > with memset(..., 0, ...). > > Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx> > --- > > (BTW, I didn't find a way to have both --autosquash-compliant and > meaningfull titles) > > wt-status.c | 49 +++++++++++++++++++++---------------------------- > 1 file changed, 21 insertions(+), 28 deletions(-) Thanks; much better. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html