diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-13 00:04:32 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-20 23:29:28 -0800 |
commit | d5d409ac7b5792f3962dbe8a7f392d09ce797266 (patch) | |
tree | e365d376163d37b270ee592e892dc093892f1336 /info.c | |
parent | 00c7550444aa1254ca43ba32d4d4e59d02bda56d (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.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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; |