This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 02/13] constify unset_in_environ
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 24 Jul 2014 02:44:22 +0100
- Subject: Re: [PATCH 02/13] constify unset_in_environ
- Authentication-results: sourceware.org; auth=none
- References: <1406055319-26380-1-git-send-email-tromey at redhat dot com> <1406055319-26380-3-git-send-email-tromey at redhat dot com>
Looks good.
Thanks,
Pedro Alves
On 07/22/2014 07:55 PM, Tom Tromey wrote:
> This constifies an argument to unset_in_environ.
>
> 2014-07-22 Tom Tromey <tromey@redhat.com>
>
> * environ.c (unset_in_environ): Make "var" const.
> * environ.h (unset_in_environ): Update.
> ---
> gdb/ChangeLog | 5 +++++
> gdb/environ.c | 2 +-
> gdb/environ.h | 2 +-
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/environ.c b/gdb/environ.c
> index 7092a1a..d661a01 100644
> --- a/gdb/environ.c
> +++ b/gdb/environ.c
> @@ -161,7 +161,7 @@ set_in_environ (struct gdb_environ *e, const char *var, const char *value)
> /* Remove the setting for variable VAR from environment E. */
>
> void
> -unset_in_environ (struct gdb_environ *e, char *var)
> +unset_in_environ (struct gdb_environ *e, const char *var)
> {
> int len = strlen (var);
> char **vector = e->vector;
> diff --git a/gdb/environ.h b/gdb/environ.h
> index 43f6bd4..5c4fac1 100644
> --- a/gdb/environ.h
> +++ b/gdb/environ.h
> @@ -42,7 +42,7 @@ extern char *get_in_environ (const struct gdb_environ *, const char *);
>
> extern void set_in_environ (struct gdb_environ *, const char *, const char *);
>
> -extern void unset_in_environ (struct gdb_environ *, char *);
> +extern void unset_in_environ (struct gdb_environ *, const char *);
>
> extern char **environ_vector (struct gdb_environ *);
>
>