]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virlog: Return void instead of int in virLogReset<Foo> methods
authorErik Skultety <eskultet@redhat.com>
Wed, 30 Mar 2016 10:25:35 +0000 (12:25 +0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 4 Jul 2016 14:43:02 +0000 (16:43 +0200)
commit9dbd728adaa5135592671adb3ea2b36d25222926
tree6370bb7bf34cc99f94a70fe1d197400fc5986b30
parentcd89d3451b8efcfed05ff1f4a91d9b252dbe26bc
virlog: Return void instead of int in virLogReset<Foo> methods

In this particular case, reset is meant as clearing the whole list of
outputs/filters, not resetting it to a predefined default setting. Looking at
it from that perspective, returning the number of records removed doesn't help
the caller in any way (not that any of the callers would actually check for
it). Well, callers could detect an error from the number of successfully
removed records, but the only thing that can fail in virLogReset is force
closing a file descriptor in which case the error isn't propagated back to
virLogReset anyway. Conclusion: there is no practical use for having a return
type of 'int' rather than 'void' in this case.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/util/virlog.c