diff options
Diffstat (limited to 'Mailbox.c')
-rw-r--r-- | Mailbox.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -545,14 +545,10 @@ static void GetMailFile (MailboxWidget w) } #endif if ((mailpath = getenv("MAIL"))) { - w->mailbox.filename = XtMalloc (strlen (mailpath) + 1); - strcpy (w->mailbox.filename, mailpath); + XtAsprintf(&w->mailbox.filename, "%s", mailpath); } else { - w->mailbox.filename = XtMalloc (strlen (MAILBOX_DIRECTORY) + 1 - + strlen (username) + 1); - strcpy (w->mailbox.filename, MAILBOX_DIRECTORY); - strcat (w->mailbox.filename, "/"); - strcat (w->mailbox.filename, username); + XtAsprintf(&w->mailbox.filename, "%s/%s", + MAILBOX_DIRECTORY, username); } return; } |