On Tuesday 2013-01-15 20:47, Lennart Poettering wrote: >> --- a/src/bootchart/bootchart.c >> +++ b/src/bootchart/bootchart.c >> @@ -232,12 +232,11 @@ int main(int argc, char *argv[]) >> } >> >> /* start with empty ps LL */ >> - ps_first = malloc(sizeof(struct ps_struct)); >> + ps_first = calloc(1, sizeof(struct ps_struct)); > >BTW, we have a nice macro for this: > > ps_first = new0(struct ps_struct, 1); > >It's tape-safe and a bit nicer to read.
If tape-safety was that important, one would do away with tapes altogether and use sizeof with like ps_first = calloc(1, sizeof(*ps_first)) _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
