projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* config/i386/tm-cygwin.h: include tm-i386.h instead of tm-i386v.h. This fixes
[binutils-gdb.git]
/
gdb
/
environ.c
diff --git
a/gdb/environ.c
b/gdb/environ.c
index 53e63e099dcb68de4ff062e478e49628486890ea..1f9a9d67e9fe9ba98fc7a1d9e5e896dfc1805043 100644
(file)
--- a/
gdb/environ.c
+++ b/
gdb/environ.c
@@
-1,5
+1,6
@@
/* environ.c -- library for manipulating environments for GNU.
/* environ.c -- library for manipulating environments for GNU.
- Copyright (C) 1986, 1989 Free Software Foundation, Inc.
+ Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-22,7
+23,6
@@
#include "defs.h"
#include "environ.h"
#include "gdb_string.h"
#include "defs.h"
#include "environ.h"
#include "gdb_string.h"
-#include "gdbcore.h"
\f
/* Return a new environment object. */
\f
/* Return a new environment object. */
@@
-48,9
+48,9
@@
free_environ (register struct environ *e)
register char **vector = e->vector;
while (*vector)
register char **vector = e->vector;
while (*vector)
- free (*vector++);
+
x
free (*vector++);
- free (e);
+
x
free (e);
}
/* Copy the environment given to this process into E.
}
/* Copy the environment given to this process into E.
@@
-137,7
+137,7
@@
set_in_environ (struct environ *e, const char *var, const char *value)
vector[i + 1] = 0;
}
else
vector[i + 1] = 0;
}
else
- free (s);
+
x
free (s);
s = (char *) xmalloc (len + strlen (value) + 2);
strcpy (s, var);
s = (char *) xmalloc (len + strlen (value) + 2);
strcpy (s, var);
@@
-171,7
+171,7
@@
unset_in_environ (struct environ *e, char *var)
{
if (STREQN (s, var, len) && s[len] == '=')
{
{
if (STREQN (s, var, len) && s[len] == '=')
{
- free (s);
+
x
free (s);
/* Walk through the vector, shuffling args down by one, including
the NULL terminator. Can't use memcpy() here since the regions
overlap, and memmove() might not be available. */
/* Walk through the vector, shuffling args down by one, including
the NULL terminator. Can't use memcpy() here since the regions
overlap, and memmove() might not be available. */