summaryrefslogtreecommitdiff
path: root/info.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-13 00:04:32 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-20 23:29:28 -0800
commitd5d409ac7b5792f3962dbe8a7f392d09ce797266 (patch)
treee365d376163d37b270ee592e892dc093892f1336 /info.c
parent00c7550444aa1254ca43ba32d4d4e59d02bda56d (diff)
Convert XtMalloc + sprintf to XtAsprintf
Depends on libXt > 1.0.99 to ensure XtAsprintf is available. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'info.c')
-rw-r--r--info.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/info.c b/info.c
index 728bbb3..2c51fd4 100644
--- a/info.c
+++ b/info.c
@@ -559,9 +559,6 @@ UpdateClientList(void)
else
hint = "";
- clientInfo = (String) XtMalloc (strlen (progName) +
- extra1 + extra2 + 3 + strlen (hostname) + 3 + strlen (hint) + 1);
-
for (k = 0; k < extra1; k++)
extraBuf1[k] = ' ';
extraBuf1[extra1] = '\0';
@@ -570,7 +567,7 @@ UpdateClientList(void)
extraBuf2[k] = ' ';
extraBuf2[extra2] = '\0';
- sprintf (clientInfo, "%s%s (%s%s) %s", progName, extraBuf1,
+ XtAsprintf (&clientInfo, "%s%s (%s%s) %s", progName, extraBuf1,
hostname, extraBuf2, hint);
clientListRecs[i] = client;