diff --git a/Makefile-daemon.am b/Makefile-daemon.am index 3be66347..eb6bc537 100644 --- a/Makefile-daemon.am +++ b/Makefile-daemon.am @@ -49,7 +49,7 @@ librpmostreed_sources = \ src/daemon/rpmostreed-os.h \ src/daemon/rpmostreed-os.cxx \ src/daemon/rpmostreed-os-experimental.h \ - src/daemon/rpmostreed-os-experimental.c \ + src/daemon/rpmostreed-os-experimental.cxx \ $(NULL) dbusconf_DATA = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.conf diff --git a/src/daemon/rpmostreed-os-experimental.c b/src/daemon/rpmostreed-os-experimental.cxx similarity index 96% rename from src/daemon/rpmostreed-os-experimental.c rename to src/daemon/rpmostreed-os-experimental.cxx index 68952ace..54cea196 100644 --- a/src/daemon/rpmostreed-os-experimental.c +++ b/src/daemon/rpmostreed-os-experimental.cxx @@ -179,15 +179,12 @@ rpmostreed_osexperimental_new (OstreeSysroot *sysroot, OstreeRepo *repo, const char *name) { - RpmostreedOSExperimental *obj = NULL; - g_autofree char *path = NULL; - g_return_val_if_fail (OSTREE_IS_SYSROOT (sysroot), NULL); g_return_val_if_fail (name != NULL, NULL); - path = rpmostreed_generate_object_path (BASE_DBUS_PATH, name, NULL); + g_autofree char *path = rpmostreed_generate_object_path (BASE_DBUS_PATH, name, NULL); - obj = g_object_new (RPMOSTREED_TYPE_OSEXPERIMENTAL, NULL); + auto obj = (RpmostreedOSExperimental *)g_object_new (RPMOSTREED_TYPE_OSEXPERIMENTAL, NULL); rpmostreed_daemon_publish (rpmostreed_daemon_get (), path, FALSE, obj);