1. 22 1月, 2013 17 次提交
    • J
      remote: Avoid coverity[leaked_storage] message. · 9cc0f8d5
      John Ferlan 提交于
      Upon successful return of virNetClientStreamEventAddCallback() the
      allocated cbdata field will be freed by virNetClientStreamEventRemoveCallback()
      as cbOpaque using the free function remoteStreamCallbackFree().
      9cc0f8d5
    • J
      qemu: Add coverity[negative_returns] tag · 6c2e4c38
      John Ferlan 提交于
      This avoids "Event negative_returns: A negative constant "-1" is passed as
      an argument to a parameter that cannot be negative.".  The called function
      uses -1 to determine whether it needs to traverse all the hostdevs.
      6c2e4c38
    • J
      rpc: Add coverity[dead_error_begin] tag · 28cd3dc4
      John Ferlan 提交于
      Coverity misses the nuance of VIR_FREE(privkey) setting privkey = NULL when
      if (!(virFileExists(privkey))) is true and thus declares the code dead.
      28cd3dc4
    • J
      xen: Add coverity[ptr_arith] and [sign_extension] tags · 8b55992f
      John Ferlan 提交于
      The old cpu bitmap setting algorithm causes a couple of complaints which
      have been tagged.
      8b55992f
    • J
      nodeinfo: Add coverity[dead_error_begin] and [returned_null] tags · 316ed412
      John Ferlan 提交于
      The use of switch statements inside a bounded for loop resulted in some
      false positives regarding the "default:" label which cannot be reached
      since each of the other case statements use the possible for loop values.
      A [dead_error_begin] was added before the default label.
      
      Commit id ebdbe25a adjusted the algorithm and the caller guarantees that
      the 'params' will have a '_' in the name being searched. Add the [returned_null]
      tag to the two instances.
      316ed412
    • J
      lxc: Add coverity[dead_error_begin] tag in switch stmts · 15666e02
      John Ferlan 提交于
      The use of switch statements inside a bounded for loop resulted in some
      false positives regarding the "default:" label which cannot be reached
      since each of the other case statements use the possible for loop values.
      15666e02
    • J
      xend: Address some Coverity false positives · 751bb8ce
      John Ferlan 提交于
      The various _for_i loops with both u.s.car and u.s.cdr were being reported
      as COPY_PASTE errors by Coverity.  This just quiets those messages.
      751bb8ce
    • J
      selinux: Resolve resource leak using the default disk label · 05cc0351
      John Ferlan 提交于
      Commit id a994ef2d changed the mechanism to store/update the default
      security label from using disk->seclabels[0] to allocating one on the
      fly. That change allocated the label, but never saved it.  This patch
      will save the label. The new virDomainDiskDefAddSecurityLabelDef() is
      a copy of the virDomainDefAddSecurityLabelDef().
      05cc0351
    • J
      util: Need to check child JSON allocation before use · e786b578
      John Ferlan 提交于
      e786b578
    • J
      1130fa31
    • J
      rpc: Remove unnecessary calls · 8d3aa092
      John Ferlan 提交于
      The code is not reachable as of commit id: bb85f229. Removed
      virKeepAliveStop() and virObjectUnref() because 'ka' cannot be
      anything but NULL at the cleanup label.
      8d3aa092
    • J
      security: Use virStrcpy to move the label · 7479026b
      John Ferlan 提交于
      7479026b
    • P
      qemu: Forbid snapshot names starting with '.' · f4ece176
      Peter Krempa 提交于
      Forbid the names to match the loading procedure of snapshots.
      f4ece176
    • M
      safe{read,write}: Document usage with nonblocking FD · 074b6d45
      Michal Privoznik 提交于
      Currently, whenever somebody calls saferead() on nonblocking FD
      (safewrite() is totally interchangeable for purpose of this message)
      he might get wrong return value. For instance, in the first iteration
      some data is read. The number of bytes read is stored into local
      variable 'nread'. However, in next iterations we can get -1 from
      read() with errno == EAGAIN, in which case the -1 is returned despite
      fact some data has already been read. So the caller gets confused.
      Bare read() should be used for nonblocking FD.
      074b6d45
    • J
      1640fafc
    • J
      docs: event.c source file was renamed as virevent.c · c72e3274
      Jiri Denemark 提交于
      c72e3274
    • E
      spec: indent %if to make it easier to see conditions · c8f79c9b
      Eric Blake 提交于
      Nested conditionals are hard to read if they are not indented.
      We can't add arbitrary whitespace to everything in spec files,
      but we CAN add spaces before %if and %define.  Use this trick,
      plus a fancy sed script that rewrites a spec file into a C
      file, so we can use cppi to keep our spec file nice.
      
      For reference, the sed script converts code like:
      
      |# RHEL-5 builds are client-only for s390, ppc
      |%if 0%{?rhel} == 5
      |    %ifnarch %{ix86} x86_64 ia64
      |        %define client_only        1
      |    %endif
      |%endif
      
      into the following for cppi:
      
      |// # RHEL-5 builds are client-only for s390, ppc
      |#if a // 0%{?rhel} == 5
      |# if a // %{ix86} x86_64 ia64
      |#  define client_only        1
      |# endif
      |#endif
      
      and errors from 'make syntax-check' look like:
      spec_indentation
      cppi: mingw-libvirt.spec.in: line 130: not properly indented
      maint.mk: incorrect preprocessor indentation
      
      * libvirt.spec.in: Add some indentation to make it easier to follow
      various conditionals.
      * mingw-libvirt-spec.in: Likewise.
      * cfg.mk (sc_spec_indentation): New syntax check to enforce it.
      c8f79c9b
  2. 21 1月, 2013 2 次提交
  3. 19 1月, 2013 2 次提交
  4. 18 1月, 2013 19 次提交