Skip to content

Commit

Permalink
Fix test against arrays that can never be NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-ancell committed Jun 14, 2022
1 parent 40c3b4d commit 1d1d1e4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/src/libsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,14 +1571,10 @@ pututxline (const struct utmpx *ut)
default:
g_string_append_printf (status, " TYPE=%d", ut->ut_type);
}
if (ut->ut_line)
g_string_append_printf (status, " LINE=%s", ut->ut_line);
if (ut->ut_id)
g_string_append_printf (status, " ID=%s", ut->ut_id);
if (ut->ut_user)
g_string_append_printf (status, " USER=%s", ut->ut_user);
if (ut->ut_host)
g_string_append_printf (status, " HOST=%s", ut->ut_host);
g_string_append_printf (status, " LINE=%s", ut->ut_line);
g_string_append_printf (status, " ID=%s", ut->ut_id);
g_string_append_printf (status, " USER=%s", ut->ut_user);
g_string_append_printf (status, " HOST=%s", ut->ut_host);
status_notify ("%s", status->str);
}

Expand Down

0 comments on commit 1d1d1e4

Please sign in to comment.