aboutsummaryrefslogtreecommitdiff
path: root/libiberty/setenv.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-06-07 21:13:14 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-06-07 21:13:14 +0000
commit69197e7e5ead2bebae71ed62532a9d422222684a (patch)
treeb85046f86e463a4f12518452c722b1a0c944bb2b /libiberty/setenv.c
parent7eb23b1f31ad41140c1a733e55a7982af23f4767 (diff)
downloadgcc-69197e7e5ead2bebae71ed62532a9d422222684a.zip
gcc-69197e7e5ead2bebae71ed62532a9d422222684a.tar.gz
gcc-69197e7e5ead2bebae71ed62532a9d422222684a.tar.bz2
configure.in (ac_libiberty_warn_cflags): Add -pedantic.
libiberty: * configure.in (ac_libiberty_warn_cflags): Add -pedantic. * choose-temp.c (try, choose_temp_base, make_temp_file): Constify. * cp-demangle.c (demangle_char): Change parameter from char to int. (demangle_expression, demangle_expr_primary): Remove extra semi-colon in prototype. * dyn-string.c (dyn_string_append_char): Change parameter from char to int. * memcmp.c (memcmp): Constify. * mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with __extension__. * partition.c (elem_compare): Prototype. Don't cast away const-ness. * setenv.c (setenv): Use braces to avoid ambiguous `else'. include: * demangle.h (demangling_styles): Remove trailing comma in enum. * dyn-string.h (dyn_string_append_char): Change parameter from char to int. From-SVN: r34447
Diffstat (limited to 'libiberty/setenv.c')
-rw-r--r--libiberty/setenv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libiberty/setenv.c b/libiberty/setenv.c
index eec1300..a90c83a 100644
--- a/libiberty/setenv.c
+++ b/libiberty/setenv.c
@@ -72,11 +72,13 @@ setenv (name, value, replace)
size = 0;
if (__environ != NULL)
- for (ep = __environ; *ep != NULL; ++ep)
- if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
- break;
- else
- ++size;
+ {
+ for (ep = __environ; *ep != NULL; ++ep)
+ if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ break;
+ else
+ ++size;
+ }
if (__environ == NULL || *ep == NULL)
{