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

Re: [libvirt] [PATCH v2] nwfilter: Fix return value of virNWFilterHashTablePut



On 11/23/2011 09:41 AM, Eric Blake wrote:
On 11/23/2011 07:19 AM, Michal Privoznik wrote:
In libvirt it is common to return value<0 on error not vice versa.
---
diff to v1:
-check 3rd call as well:
https://www.redhat.com/archives/libvir-list/2011-November/msg01312.html

  src/conf/nwfilter_params.c             |   16 +++++++-------
  src/nwfilter/nwfilter_gentech_driver.c |   37 ++++++++++++++-----------------
  src/nwfilter/nwfilter_learnipaddr.c    |    5 +---
  3 files changed, 26 insertions(+), 32 deletions(-)

But I think we're safe; all the call chains into filter instantiation
are currently checking merely for non-zero values, and it probably won't
be much longer before we also have a further patch to make the overall
virNWFilterInstantiate return -1 on all failure paths.
Had one like that for a while. will post shortly...

  Stefan


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