Re: [PATCH] Use g_steal_pointer where possible

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

 



On a Tuesday in 2021, Kristina Hanicova wrote:
Via coccinelle (not the hanbag!)

s/hanbag/handbag/

spatches used:
@ rule1 @
identifier a, b;
symbol NULL;
@@

- b = a;
 ... when != a
- a = NULL;
+ b = g_steal_pointer(&a);

@@

- *b = a;
 ... when != a
- a = NULL;
+ *b = g_steal_pointer(&a);

Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
src/admin/admin_server.c                |  6 ++----
src/conf/capabilities.c                 |  3 +--
src/conf/netdev_bandwidth_conf.c        |  3 +--
src/conf/virdomainobjlist.c             |  3 +--
src/conf/virnwfilterobj.c               |  3 +--
src/interface/interface_backend_netcf.c |  3 +--
src/interface/interface_backend_udev.c  |  3 +--
src/qemu/qemu_driver.c                  | 12 ++++-------
src/qemu/qemu_monitor_json.c            | 27 +++++++++----------------
src/remote/remote_driver.c              | 12 ++++-------
src/rpc/virnetserver.c                  |  3 +--
src/util/virfile.c                      |  9 +++------
src/util/virlog.c                       |  6 ++----
src/util/virmdev.c                      |  3 +--
src/util/virsysinfo.c                   | 21 +++++++------------
src/util/virtypedparam.c                |  3 +--
src/vbox/vbox_common.c                  |  3 +--
src/vz/vz_driver.c                      |  3 +--
tests/commandhelper.c                   |  3 +--
tools/virsh-checkpoint.c                |  3 +--
tools/virsh-domain.c                    |  3 +--
21 files changed, 45 insertions(+), 90 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[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