]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virnetserverservice: Resolve Coverity ARRAY_VS_SINGLETON
authorJohn Ferlan <jferlan@redhat.com>
Thu, 28 Aug 2014 13:03:47 +0000 (09:03 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 28 Aug 2014 23:18:37 +0000 (19:18 -0400)
commite387f4c1f15e2e1a4582d7751c6f9d4dfef4b5ce
treea0c4fa1237eda4b657f5eb0ec2f8d2cdd7ce4647
parentef8da2ad11827109bd255dd060a14d89286af2a9
virnetserverservice: Resolve Coverity ARRAY_VS_SINGLETON

Coverity complained about the following:

(3) Event ptr_arith:
   Performing pointer arithmetic on "cur_fd" in expression "cur_fd++".
130             return virNetServerServiceNewFD(*cur_fd++,

The complaint is that pointer arithmetic taking place instead of the
expected auto increment of the variable...  Adding some well placed
parentheses ensures our order of operation.
src/rpc/virnetserverservice.c