summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 5b7bb25..32f28e5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -388,8 +388,8 @@ read_startup_files (char *alt_rcfile)
}
else
{
- char *filename = (char*)xmalloc (strlen (homedir) + strlen ("/.ratpoisonrc") + 1);
- sprintf (filename, "%s/.ratpoisonrc", homedir);
+ char *filename;
+ filename = xsprintf ("%s/.ratpoisonrc", homedir);
if ((fileptr = fopen (filename, "r")) == NULL)
{