diff options
author | Robert Millan <rmh@aybabtu.com> | 2006-03-30 13:53:34 +0000 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2008-05-06 08:56:34 +0300 |
commit | 326d210f1774a30e309062c3d5819e5868e4ee4b (patch) | |
tree | a83fe097d97da8679126c5f30436f242d53bed2f /src | |
parent | 1d87476250217a87319df48a8f473415c0515106 (diff) | |
download | libbsd-326d210f1774a30e309062c3d5819e5868e4ee4b.tar.gz |
Revert 1d87476250217a87319df48a8f473415c0515106
Diffstat (limited to 'src')
-rw-r--r-- | src/progname.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/progname.c b/src/progname.c index e422b5e..7777658 100644 --- a/src/progname.c +++ b/src/progname.c @@ -19,10 +19,9 @@ Rejected in glibc (http://sourceware.org/ml/libc-alpha/2006-03/msg00125.html) */ -#include <bsd/stdlib.h> /* progname, strdup */ -#include <string.h> /* free */ +#include <bsd/stdlib.h> -char *__progname = NULL; +static char *__progname = NULL; char * getprogname () @@ -33,10 +32,5 @@ getprogname () void setprogname (char *new) { - /* For some reason, accessing the argv vector directly may cause SIGSEV. Let's copy it to avoid trouble. */ - - if (__progname != NULL) - free (__progname); - - __progname = strdup (new); + __progname = new; } |