summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa55ccb)
(captured_main): Avois using strcpy and strcat.
+2005-04-02 Mark Kettenis <kettenis@gnu.org>
+
+ * main.c: Update copyright year.
+ (captured_main): Avois using strcpy and strcat.
+
2005-04-01 Michael Snyder <msnyder@redhat.com>
* dummy-frame.c (dummy_frame_sniffer): Optimization: don't bother
2005-04-01 Michael Snyder <msnyder@redhat.com>
* dummy-frame.c (dummy_frame_sniffer): Optimization: don't bother
/* Top level stuff for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
/* Top level stuff for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
int ndir;
struct stat homebuf, cwdbuf;
int ndir;
struct stat homebuf, cwdbuf;
- char *homedir, *homeinit;
homedir = getenv ("HOME");
if (homedir)
{
homedir = getenv ("HOME");
if (homedir)
{
- homeinit = (char *) alloca (strlen (homedir) +
- strlen (gdbinit) + 10);
- strcpy (homeinit, homedir);
- strcat (homeinit, "/");
- strcat (homeinit, gdbinit);
+ char *homeinit = xstrprintf ("%s/%s", homedir, gdbinit);
stat (homeinit, &homebuf);
stat (gdbinit, &cwdbuf); /* We'll only need this if
homedir was set. */
stat (homeinit, &homebuf);
stat (gdbinit, &cwdbuf); /* We'll only need this if
homedir was set. */
}
/* Now perform all the actions indicated by the arguments. */
}
/* Now perform all the actions indicated by the arguments. */