From 79488a76de5ab71a4bf777218b202db8fdfc7967 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 21 Dec 2020 16:08:51 +0000 Subject: [PATCH] Port rpmostree-builtin-db to C++ Prep for using https://cxx.rs/ --- Makefile-rpm-ostree.am | 2 +- src/app/{rpmostree-builtin-db.c => rpmostree-builtin-db.cxx} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/app/{rpmostree-builtin-db.c => rpmostree-builtin-db.cxx} (97%) diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index 4f07d081..bd1cf732 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -41,7 +41,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \ src/app/rpmostree-builtin-ex.cxx \ src/app/rpmostree-builtin-testutils.cxx \ src/app/rpmostree-builtin-shlib-backend.cxx \ - src/app/rpmostree-builtin-db.c \ + src/app/rpmostree-builtin-db.cxx \ src/app/rpmostree-builtin-start-daemon.c \ src/app/rpmostree-builtin-finalize-deployment.c \ src/app/rpmostree-db-builtin-diff.c \ diff --git a/src/app/rpmostree-builtin-db.c b/src/app/rpmostree-builtin-db.cxx similarity index 97% rename from src/app/rpmostree-builtin-db.c rename to src/app/rpmostree-builtin-db.cxx index 3c9419f9..c5040e9e 100644 --- a/src/app/rpmostree-builtin-db.c +++ b/src/app/rpmostree-builtin-db.cxx @@ -33,7 +33,7 @@ static RpmOstreeCommand rpm_subcommands[] = { { "version", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, "Show rpmdb version of packages within the commits", rpmostree_db_builtin_version }, - { NULL, 0, NULL, NULL } + { NULL, (RpmOstreeBuiltinFlags)0, NULL, NULL } }; static char *opt_repo; @@ -86,7 +86,7 @@ rpmostree_db_option_context_parse (GOptionContext *context, if (rpmReadConfigFiles (NULL, NULL)) return glnx_throw (error, "rpm failed to init: %s", rpmlogMessage ()); - *out_repo = g_steal_pointer (&repo); + *out_repo = util::move_nullify (repo); return TRUE; }