summaryrefslogtreecommitdiff
path: root/ncurses/tinfo/home_terminfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/tinfo/home_terminfo.c')
-rw-r--r--ncurses/tinfo/home_terminfo.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c
index 69d69f9..e77f71c 100644
--- a/ncurses/tinfo/home_terminfo.c
+++ b/ncurses/tinfo/home_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include <curses.priv.h>
#include <tic.h>
-MODULE_ID("$Id: home_terminfo.c,v 1.12 2010/12/25 23:43:58 tom Exp $")
+MODULE_ID("$Id: home_terminfo.c,v 1.15 2012/10/27 21:49:14 tom Exp $")
/* ncurses extension...fall back on user's private directory */
@@ -54,10 +54,8 @@ _nc_home_terminfo(void)
if (MyBuffer == 0) {
if ((home = getenv("HOME")) != 0) {
size_t want = (strlen(home) + sizeof(PRIVATE_INFO));
- MyBuffer = typeMalloc(char, want);
- if (MyBuffer == 0)
- _nc_err_abort(MSG_NO_MEMORY);
- (void) sprintf(MyBuffer, PRIVATE_INFO, home);
+ TYPE_MALLOC(char, want, MyBuffer);
+ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(want) PRIVATE_INFO, home);
}
}
result = MyBuffer;