summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/who.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/who.c b/src/who.c
index 184a8cb70..1336510f3 100644
--- a/src/who.c
+++ b/src/who.c
@@ -390,7 +390,7 @@ print_user (const STRUCT_UTMP *utmp_ent)
if (hostlen < strlen (host) + strlen (display) + 4)
{
hostlen = strlen (host) + strlen (display) + 4;
- hoststr = (char *) realloc (hoststr, hostlen);
+ hoststr = xrealloc (hoststr, hostlen);
}
sprintf (hoststr, "(%s:%s)", host, display);
}
@@ -399,7 +399,7 @@ print_user (const STRUCT_UTMP *utmp_ent)
if (hostlen < strlen (host) + 3)
{
hostlen = strlen (host) + 3;
- hoststr = (char *) realloc (hoststr, hostlen);
+ hoststr = xrealloc (hoststr, hostlen);
}
sprintf (hoststr, "(%s)", host);
}
@@ -409,7 +409,7 @@ print_user (const STRUCT_UTMP *utmp_ent)
if (hostlen < 1)
{
hostlen = 1;
- hoststr = (char *) realloc (hoststr, hostlen);
+ hoststr = xrealloc (hoststr, hostlen);
}
stpcpy (hoststr, "");
}