Group :: Graphical desktop/Other
RPM: lightdm
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: lightdm-1.32.0-addrfix.patch
Download
Download
src/session-child.c | 8 ++++----
tests/src/libsystem.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/session-child.c b/src/session-child.c
index 112daabe..fcbdf1e1 100644
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -201,13 +201,13 @@ updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
memset (&u, 0, sizeof (u));
u.ut_type = ut->ut_type;
u.ut_pid = ut->ut_pid;
- if (ut->ut_line)
+ if (*ut->ut_line)
strncpy (u.ut_line, ut->ut_line, sizeof (u.ut_line));
- if (ut->ut_id)
+ if (*ut->ut_id)
strncpy (u.ut_id, ut->ut_id, sizeof (u.ut_id));
- if (ut->ut_user)
+ if (*ut->ut_user)
strncpy (u.ut_user, ut->ut_user, sizeof (u.ut_user));
- if (ut->ut_host)
+ if (*ut->ut_host)
strncpy (u.ut_host, ut->ut_host, sizeof (u.ut_host));
u.ut_tv.tv_sec = ut->ut_tv.tv_sec;
u.ut_tv.tv_usec = ut->ut_tv.tv_usec;
diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c
index 1c68dc10..0950b861 100644
--- a/tests/src/libsystem.c
+++ b/tests/src/libsystem.c
@@ -1611,13 +1611,13 @@ updwtmp (const char *wtmp_file, const struct utmp *ut)
default:
g_string_append_printf (status, " TYPE=%d", ut->ut_type);
}
- if (ut->ut_line)
+ if (*ut->ut_line)
g_string_append_printf (status, " LINE=%s", ut->ut_line);
- if (ut->ut_id)
+ if (*ut->ut_id)
g_string_append_printf (status, " ID=%s", ut->ut_id);
- if (ut->ut_user)
+ if (*ut->ut_user)
g_string_append_printf (status, " USER=%s", ut->ut_user);
- if (ut->ut_host)
+ if (*ut->ut_host)
g_string_append_printf (status, " HOST=%s", ut->ut_host);
status_notify ("%s", status->str);
}