summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2009-09-24 02:34:31 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2009-09-24 02:34:31 -0400
commit3719fa53557d39d9b8a024d1cc7542ab6f9981d6 (patch)
treebb36a7e77b09c69b88ce7af9d9db4f2fbf8c32e5
parentf40de949f72bb0da2c64776fdda039a855ea0374 (diff)
fix style
-rw-r--r--src/ck-seat.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/ck-seat.c b/src/ck-seat.c
index fedd900..af7db59 100644
--- a/src/ck-seat.c
+++ b/src/ck-seat.c
@@ -1202,42 +1202,49 @@ env_add_session_info (CkSession *session,
return;
}
+ s = NULL;
if (ck_session_get_id (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sID=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
+ s = NULL;
if (ck_session_get_session_type (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sTYPE=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
if (ck_session_get_unix_user (session, &u, NULL)) {
extra_env[(*n)++] = g_strdup_printf ("%sUSER_UID=%u", prefix, u);
}
+ s = NULL;
if (ck_session_get_display_device (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sDISPLAY_DEVICE=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
+ s = NULL;
if (ck_session_get_x11_display_device (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sX11_DISPLAY_DEVICE=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
+ s = NULL;
if (ck_session_get_x11_display (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sX11_DISPLAY=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
+ s = NULL;
if (ck_session_get_remote_host_name (session, &s, NULL) && s != NULL && *s != '\0') {
extra_env[(*n)++] = g_strdup_printf ("%sREMOTE_HOST_NAME=%s", prefix, s);
- g_free (s);
}
+ g_free (s);
- if (ck_session_is_local (session, &b, NULL))
+ if (ck_session_is_local (session, &b, NULL)) {
extra_env[(*n)++] = g_strdup_printf ("%sIS_LOCAL=%s", prefix, b ? "true" : "false");
+ }
}
void