aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_util.c
diff options
context:
space:
mode:
authorPeter Seebach <seebs@eee12.(none)>2010-04-30 12:30:01 -0500
committerPeter Seebach <seebs@eee12.(none)>2010-04-30 17:54:12 -0500
commit0bc0b5a7f6eecb6bc129b1ab3b35d69f93c9e7a4 (patch)
tree2b4e0ef6168b262f8e59a50197f3edc3cebc2409 /pseudo_util.c
parentf97830a23402ac218a477828bf481bcff139507d (diff)
downloadpseudo-0bc0b5a7f6eecb6bc129b1ab3b35d69f93c9e7a4.tar.gz
pseudo-0bc0b5a7f6eecb6bc129b1ab3b35d69f93c9e7a4.tar.bz2
pseudo-0bc0b5a7f6eecb6bc129b1ab3b35d69f93c9e7a4.zip
Miscellaneous cleanup.
Address a couple of compiler warnings, add a couple of signals to the list of caught signals, etcetera.
Diffstat (limited to 'pseudo_util.c')
-rw-r--r--pseudo_util.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/pseudo_util.c b/pseudo_util.c
index 388ff50..9bbd756 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -367,14 +367,11 @@ pseudo_fix_path(const char *base, const char *path, size_t rootlen, size_t basel
char **
pseudo_dropenv(char * const *environ) {
char **new_environ;
- int env_count = 0, found_preload = 0;
+ int env_count = 0;
int i, j;
- for (i = 0; environ[i]; ++i) {
- if (!memcmp(environ[i], "LD_PRELOAD=", 11))
- found_preload = 1;
+ for (i = 0; environ[i]; ++i)
++env_count;
- }
new_environ = malloc((env_count + 1) * sizeof(*new_environ));
if (!new_environ) {
pseudo_diag("fatal: can't allocate new environment.\n");
@@ -387,6 +384,7 @@ pseudo_dropenv(char * const *environ) {
char *p;
if (!strcmp(s, libpseudo_name)) {
/* drop it completely */
+ continue;
} else if ((p = strstr(s, libpseudo_name)) != NULL) {
char *without = strdup(environ[i]);
if (!without) {