From: Tom Tromey Date: Mon, 21 Jul 2014 22:33:21 +0000 (-0600) Subject: constify unset_in_environ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41c77899672db7a30d09d2e68524f0eb3faf937b;p=binutils-gdb.git constify unset_in_environ This constifies an argument to unset_in_environ. 2014-07-24 Tom Tromey * environ.c (unset_in_environ): Make "var" const. * environ.h (unset_in_environ): Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 959600d7db3..b7d0739d870 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-07-24 Tom Tromey + + * environ.c (unset_in_environ): Make "var" const. + * environ.h (unset_in_environ): Update. + 2014-07-24 Tom Tromey * cli/cli-dump.c (scan_expression_with_cleanup): Return const. diff --git a/gdb/environ.c b/gdb/environ.c index 7092a1a3c95..d661a01010c 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 43f6bd415ea..5c4fac1a08e 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 *);