diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-16 22:06:06 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-16 22:06:06 +0000 |
commit | 360a49cad85ea3c41c890a89fe42256af76d02e3 (patch) | |
tree | 24459d88c3aaad4c2f96124623af64d424bae552 /gcc/ada/env.c | |
parent | 889361501c3780c472a587dca89f096f9bdfcb73 (diff) | |
download | gcc-360a49cad85ea3c41c890a89fe42256af76d02e3.tar.gz |
* env.c (__gnat_setenv): Use size_t.
(__gnat_unsetenv): Likewise.
(__gnat_clearenv): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/env.c')
-rw-r--r-- | gcc/ada/env.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/env.c b/gcc/ada/env.c index 039e09ced6e..bdba790f490 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -170,7 +170,7 @@ __gnat_setenv (char *name, char *value) setenv (name, value, 1); #else - int size = strlen (name) + strlen (value) + 2; + size_t size = strlen (name) + strlen (value) + 2; char *expression; expression = (char *) xmalloc (size * sizeof (char)); @@ -234,7 +234,7 @@ void __gnat_unsetenv (char *name) { As we are still supporting AIX 5.1 we cannot use unsetenv */ char **env = __gnat_environ (); int index = 0; - int size = strlen (name); + size_t size = strlen (name); while (env[index] != NULL) { if (strlen (env[index]) > size) { @@ -258,7 +258,7 @@ void __gnat_unsetenv (char *name) { /* On Windows platform putenv ("key=") is equivalent to unsetenv (a subsequent call to getenv ("key") will return NULL and not the "\0" string */ - int size = strlen (name) + 2; + size_t size = strlen (name) + 2; char *expression; expression = (char *) xmalloc (size * sizeof (char)); @@ -293,7 +293,7 @@ void __gnat_clearenv (void) { environment but there is a "clean" way to unset a variable. So go through the environ table and call __gnat_unsetenv on all entries */ char **env = __gnat_environ (); - int size; + size_t size; while (env[0] != NULL) { size = 0; |