Commit fd7927cd by Eric Botcazou Committed by Eric Botcazou

env.c (__gnat_setenv): Use size_t.

	* env.c (__gnat_setenv): Use size_t.
	(__gnat_unsetenv): Likewise.
	(__gnat_clearenv): Likewise.

From-SVN: r111155
parent e1e835dc
2006-02-16 Eric Botcazou <ebotcazou@adacore.com>
* env.c (__gnat_setenv): Use size_t.
(__gnat_unsetenv): Likewise.
(__gnat_clearenv): Likewise.
2006-02-16 Arnaud Charlet <charlet@adacore.com>
* opt.ads (Ada_Version_Default): Set to Ada 2005 by default.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment