Re: [PATCH 32/34] tests: use g_strdup instead of VIR_STRDUP

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

 



On 10/20/19 2:55 PM, Ján Tomko wrote:
Replace all occurrences of
   if (VIR_STRDUP(a, b) < 0)
      /* effectively dead code */
with:
   a = g_strdup(b);

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
  tests/bhyvexml2argvmock.c               |  6 +--
  tests/commandtest.c                     |  5 +--
  tests/cputest.c                         |  4 +-
  tests/domaincapstest.c                  | 13 +++---
  tests/nssmock.c                         |  3 +-
  tests/openvzutilstest.c                 |  5 ++-
  tests/qemublocktest.c                   |  3 +-
  tests/qemudomaincheckpointxml2xmltest.c |  9 ++--
  tests/qemufirmwaretest.c                |  3 +-
  tests/qemuhotplugtest.c                 |  8 +---
  tests/qemumemlocktest.c                 |  5 +--
  tests/qemumonitorjsontest.c             |  3 +-
  tests/qemumonitortestutils.c            | 32 ++++++--------
  tests/qemusecuritymock.c                |  6 +--
  tests/qemuvhostusertest.c               |  3 +-
  tests/qemuxml2argvtest.c                | 55 ++++++++-----------------
  tests/qemuxml2xmltest.c                 |  5 +--
  tests/scsihosttest.c                    |  5 +--
  tests/securityselinuxlabeltest.c        |  8 +---
  tests/securityselinuxtest.c             | 13 +++---
  tests/storagebackendsheepdogtest.c      |  6 +--
  tests/testutils.c                       |  3 +-
  tests/testutilsqemu.c                   | 31 +++++---------
  tests/vboxsnapshotxmltest.c             |  4 +-
  tests/viralloctest.c                    |  3 +-
  tests/vircgrouptest.c                   |  5 +--
  tests/virfilecachetest.c                |  7 +---
  tests/virfirewalltest.c                 |  8 ++--
  tests/virhostdevtest.c                  |  8 +---
  tests/virnetmessagetest.c               | 11 ++---
  tests/virpcimock.c                      | 19 +++++----
  tests/virpcitest.c                      |  5 +--
  tests/virscsitest.c                     |  5 +--
  tests/virstoragetest.c                  |  6 +--
  tests/virstringtest.c                   |  9 ++--
  tests/virtestmock.c                     |  3 +-
  tests/virusbmock.c                      |  4 +-
  tests/vmx2xmltest.c                     |  3 +-
  tests/xml2vmxtest.c                     |  3 +-
  39 files changed, 115 insertions(+), 222 deletions(-)

There's one more occurrance in tests/virstringtest.c:273 but it looks like the test case can be dropped completely - we don't need to test whether g_strdup() behaves sanely, do we?

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux