summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaLyong Cho <walyong.cho@samsung.com>2016-11-23 07:03:10 (GMT)
committerWaLyong Cho <walyong.cho@samsung.com>2016-11-23 07:03:10 (GMT)
commit9094fb6d875099ea1956780d334eff98ac138b4f (patch)
tree25ccb3dba5deb0a7049bcfa3586fdf8cdfa56730
parent7c2a7c86a22dc42c61163fd4e50c1cc5d7f77b13 (diff)
downloadlibsystem-9094fb6d875099ea1956780d334eff98ac138b4f.zip
libsystem-9094fb6d875099ea1956780d334eff98ac138b4f.tar.gz
libsystem-9094fb6d875099ea1956780d334eff98ac138b4f.tar.bz2
libsystem-sd: use conrresponding macro for each type
Change-Id: I711554f8e4cf372b5916d06ed28c9c2f0f0298a5 Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
-rw-r--r--src/libsystem-sd/systemd.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libsystem-sd/systemd.c b/src/libsystem-sd/systemd.c
index cfcd5d6..ab0439b 100644
--- a/src/libsystem-sd/systemd.c
+++ b/src/libsystem-sd/systemd.c
@@ -87,7 +87,7 @@ static int systemd_call_sync(GDBusConnection *connection,
NULL,
&err);
else {
- g_autofree GDBusProxy *proxy = NULL;
+ g_autoptr(GDBusProxy) proxy = NULL;
proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
@@ -125,8 +125,8 @@ static int systemd_call_sync(GDBusConnection *connection,
}
int systemd_subscribe(GDBusConnection *connection, char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
int r;
r = systemd_call_sync(connection,
@@ -148,8 +148,8 @@ int systemd_subscribe(GDBusConnection *connection, char **err_msg) {
}
int systemd_unsubscribe(GDBusConnection *connection, char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
int r;
r = systemd_call_sync(connection,
@@ -175,8 +175,8 @@ int systemd_get_unit(GDBusConnection *connection,
char **unit,
char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
char *obj = NULL;
int r;
@@ -219,8 +219,8 @@ int systemd_control_unit(GDBusConnection *connection,
char **job,
char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
char *obj = NULL;
int r;
@@ -347,7 +347,7 @@ static int systemd_get_property(GDBusConnection *connection,
GVariant **variant,
char **err_msg) {
- g_autofree GError *error = NULL;
+ g_autoptr(GError) error = NULL;
int r;
assert(name);
@@ -471,7 +471,7 @@ static int systemd_get_service_property(GDBusConnection *connection,
value* result, \
char** err_msg) { \
\
- g_autofree GVariant *var = NULL, *inner = NULL; \
+ g_autoptr(GVariant) var = NULL, inner = NULL; \
int r; \
\
assert(target); \
@@ -606,7 +606,7 @@ void systemd_unit_status_list_free_full(GList *status_list) {
static int systemd_parse_list_units_result(GVariant *result, GList **unit_list) {
char *name, *description, *load_state, *active_state, *sub_state;
char *followed, *obj_path, *job_type, *job_obj_path;
- g_autofree GVariantIter *iter;
+ g_autoptr(GVariantIter) iter;
unsigned int job_id;
GList *list = NULL;
int r;
@@ -728,8 +728,8 @@ on_error:
}
int systemd_get_units_list(GDBusConnection *conn, GList **unit_list, char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
int r;
assert(unit_list);
@@ -786,7 +786,7 @@ void systemd_unit_file_status_list_free_full(GList *status_list) {
}
static int systemd_parse_list_unit_files_result(GVariant *result, GList **unit_files_list) {
- g_autofree GVariantIter *iter;
+ g_autoptr(GVariantIter) iter;
GList *list = NULL;
char *name, *status;
int r;
@@ -843,8 +843,8 @@ on_error:
}
int systemd_get_unit_files_list(GDBusConnection *conn, GList **unit_files_list, char **err_msg) {
- g_autofree GVariant *reply = NULL;
- g_autofree GError *error = NULL;
+ g_autoptr(GVariant) reply = NULL;
+ g_autoptr(GError) error = NULL;
int r;
assert(conn);