Inspired by Peter's patch:

https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/TRQ3G36PNHBPBNXISQDTXXTT25N7GRL2/

(since it wasn't merged yet, one hunk in patch 7/7 is the same as
 Peter's; I'll update it after Peter merges his patches)

There are some function which are declared to return an int, but in fact
return a boolean:

  int foo(...)
  {
      ...
      return true;
  }

Worse, some mix ints and bools. With a help of coccinelle I was able to
identify some offenders. And either redeclare them to return a bool, or
fix those (misleading) return statements.

Michal Prívozník (7):
  storage_backend_rbd.c: Make virStorageBackendRBDSetAllocation() stub
    report an error
  nwfilter: Fix return type of virNWFilterCanApplyBasicRules callback
  qemu_process: Fix return type of
    qemuDomainHasHotpluggableStartupVcpus()
  storage_backend_rbd.C: Fix return type of a
    volStorageBackendRBDUseFastDiff() stub
  virnetdevvlan: Fix return type of virNetDevVlanEqual()
  virsh-pool.c: Fix return type of virshBuildPoolXML()
  src: Fix retval of some functions declared to return an int

 src/ch/ch_hostdev.c                       | 8 ++++----
 src/nwfilter/nwfilter_ebiptables_driver.c | 2 +-
 src/nwfilter/nwfilter_tech_driver.h       | 2 +-
 src/qemu/qemu_domain.c                    | 8 ++++----
 src/qemu/qemu_process.c                   | 2 +-
 src/storage/storage_backend_rbd.c         | 5 +++--
 src/util/vircommand.c                     | 2 +-
 src/util/virnetdevvlan.c                  | 2 +-
 src/util/virnetdevvlan.h                  | 2 +-
 tools/virsh-pool.c                        | 2 +-
 10 files changed, 18 insertions(+), 17 deletions(-)

-- 
2.49.0

Reply via email to