[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.



Konrad Rzeszutek Wilk writes ("Re: [PATCH v3 5/5] mkelf32: Close those file 
descriptors in the error paths."):
> <chuckles>
> 
> If I turned them in:
> 
>       if (..blah..)
>       {
>               close(infd);
>               return -1;
>       }
> 
> would that satisfy you?

I would strongly resist that.  That coding style is an error handling
antipattern.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.