summaryrefslogtreecommitdiff
path: root/save.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 /save.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 'save.c')
-rw-r--r--save.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/save.c b/save.c
index 1c40d72..3cb0c36 100644
--- a/save.c
+++ b/save.c
@@ -1314,9 +1314,6 @@ PopupBadSave(void)
extra1 = maxlen1 - strlen (progName) + 5;
extra2 = maxlen2 - strlen (hostname);
- clientInfo = (String) XtMalloc (strlen (progName) +
- extra1 + extra2 + 3 + strlen (hostname) + 1);
-
for (k = 0; k < extra1; k++)
extraBuf1[k] = ' ';
extraBuf1[extra1] = '\0';
@@ -1325,7 +1322,7 @@ PopupBadSave(void)
extraBuf2[k] = ' ';
extraBuf2[extra2] = '\0';
- sprintf (clientInfo, "%s%s (%s%s)", progName, extraBuf1,
+ XtAsprintf (&clientInfo, "%s%s (%s%s)", progName, extraBuf1,
hostname, extraBuf2);
failedNames[i++] = clientInfo;