On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote:
> What about:
>         int err = 0;
> 
>         err += tracing_data_header();
>         err += read_header_files();
>         [...]
> 
>         if (err < 0) {
>                 free(tdata);
>                 tdata = NULL;
>         }
> 
> Also, is the only clean up needed be freeing tdata?

I always use err |= foo() and if (err) but I suppose it doesn't matter
the original error codes are lost both ways which doesn't seem to be a
problem here.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to