diff options
author | Kalev Lember <klember@redhat.com> | 2015-09-08 14:30:28 +0200 |
---|---|---|
committer | Kalev Lember <klember@redhat.com> | 2015-09-08 14:32:23 +0200 |
commit | 6ef00b04680e3bfb8923158f7ffef3de8d9b09ef (patch) | |
tree | 0b21f7b95bc27223621ae657c2b04f20b78df877 /libappstream-builder/asb-package-rpm.c | |
parent | a3d06c5cb6f85e963be74e8866e1c3bc71ee4990 (diff) | |
download | appstream-glib-6ef00b04680e3bfb8923158f7ffef3de8d9b09ef.tar.gz |
Use GLib's cleanup functions instead of libgsystem's
We still have a few types that don't support g_autoptr(), but very very
close to having everything ported over.
This also bumps gdk-pixbuf dep to 2.31.5 for the cleanup macro support.
Diffstat (limited to 'libappstream-builder/asb-package-rpm.c')
-rw-r--r-- | libappstream-builder/asb-package-rpm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libappstream-builder/asb-package-rpm.c b/libappstream-builder/asb-package-rpm.c index 9df3811..0703ae1 100644 --- a/libappstream-builder/asb-package-rpm.c +++ b/libappstream-builder/asb-package-rpm.c @@ -80,8 +80,8 @@ asb_package_rpm_set_license (AsbPackage *pkg, const gchar *license) { guint i; guint j; - _cleanup_free_ gchar *new = NULL; - _cleanup_strv_free_ gchar **tokens = NULL; + g_autofree gchar *new = NULL; + g_auto(GStrv) tokens = NULL; struct { const gchar *fedora; const gchar *spdx; @@ -203,7 +203,7 @@ static void asb_package_rpm_set_source (AsbPackage *pkg, const gchar *source) { gchar *tmp; - _cleanup_free_ gchar *srcrpm = NULL; + g_autofree gchar *srcrpm = NULL; /* this isn't supposed to happen */ if (source == NULL) { @@ -333,7 +333,7 @@ asb_package_rpm_add_release (AsbPackage *pkg, const gchar *version; gchar *tmp; gchar *vr; - _cleanup_free_ gchar *name_dup = NULL; + g_autofree gchar *name_dup = NULL; /* get last string chunk */ name_dup = g_strchomp (g_strdup (name)); @@ -440,7 +440,7 @@ asb_package_rpm_ensure_deps (AsbPackage *pkg, GError **error) goto out; } while (rpmtdNext (td) != -1) { - _cleanup_free_ gchar *dep_no_qual = NULL; + g_autofree gchar *dep_no_qual = NULL; dep = rpmtdGetString (td); if (g_str_has_prefix (dep, "rpmlib")) continue; @@ -470,9 +470,9 @@ asb_package_rpm_ensure_filelists (AsbPackage *pkg, GError **error) gint rc; guint i; rpmtd td[3] = { NULL, NULL, NULL }; - _cleanup_free_ const gchar **dirnames = NULL; - _cleanup_free_ gint32 *dirindex = NULL; - _cleanup_strv_free_ gchar **filelist = NULL; + g_autofree const gchar **dirnames = NULL; + g_autofree gint32 *dirindex = NULL; + g_auto(GStrv) filelist = NULL; /* is a virtual package with no files */ if (!headerIsEntry (priv->h, RPMTAG_DIRINDEXES)) |