diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index 60e27b3f..7a90a44a 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -44,7 +44,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \ src/app/rpmostree-builtin-db.cxx \ src/app/rpmostree-builtin-start-daemon.cxx \ src/app/rpmostree-builtin-finalize-deployment.cxx \ - src/app/rpmostree-db-builtin-diff.c \ + src/app/rpmostree-db-builtin-diff.cxx \ src/app/rpmostree-db-builtin-list.c \ src/app/rpmostree-db-builtin-version.c \ src/app/rpmostree-dbus-helpers.cxx \ diff --git a/src/app/rpmostree-db-builtin-diff.c b/src/app/rpmostree-db-builtin-diff.cxx similarity index 98% rename from src/app/rpmostree-db-builtin-diff.c rename to src/app/rpmostree-db-builtin-diff.cxx index 54db223a..66b86452 100644 --- a/src/app/rpmostree-db-builtin-diff.c +++ b/src/app/rpmostree-db-builtin-diff.cxx @@ -30,7 +30,7 @@ #include "rpmostree-rpm-util.h" #include "rpmostree-package-variants.h" -static char *opt_format = "block"; +static char *opt_format; static gboolean opt_changelogs; static char *opt_sysroot; static gboolean opt_base; @@ -117,7 +117,7 @@ get_checksum_from_deployment (OstreeRepo *repo, if (!checksum) checksum = g_strdup (ostree_deployment_get_csum (deployment)); - *out_checksum = g_steal_pointer (&checksum); + *out_checksum = util::move_nullify (checksum); return TRUE; } @@ -162,6 +162,9 @@ rpmostree_db_builtin_diff (int argc, char **argv, return FALSE; } + if (!opt_format) + opt_format = g_strdup ("block"); + if (g_str_equal (opt_format, "json") && opt_changelogs) { rpmostree_usage_error (context, "json format and --changelogs not supported", error);