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

Re: [libvirt] [PATCH] util: make interface.c functions consistently return < 0 on error

On 07/22/2011 12:22 AM, Eric Blake wrote:
On 07/21/2011 10:03 PM, Laine Stump wrote:
(This patch must be pushed before the "listenNetwork" patches can be

All of the functions in util/interface.c were returning 0 on success,
but some returned -1 on error, and some returned a positive value
(usually the value of errno, but sometimes just 1). Libvirt's standard
is to return<  0 on error (in the case of functions that need to
return errno, -errno is returned.

This patch modifies all functions in interface.c to consistently
return<  0 on error, and makes changes to callers of those functions
where necessary.

I looked through the source code, and think you got all of the callers correctly, as well as all of interface.c. Hopefully I didn't miss anything.

Thanks, I just pushed it.

Of course now that I've seen Dan's idea for nicer XML, it will be awhile before I push the "listenNetwork" series that brought this up (hmm, I'll have to change my shorthand for it, since that attribute will disappear)

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