This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING^6][BZ #15894][PATCH] Deduplicate setenv.c
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Mike Frysinger <vapier at gentoo dot org>, libc-alpha at sourceware dot org
- Date: Tue, 11 Feb 2014 16:08:41 +0530
- Subject: Re: [PING^6][BZ #15894][PATCH] Deduplicate setenv.c
- Authentication-results: sourceware.org; auth=none
- References: <20131015093450 dot GA1459 at domone dot podge> <20131204113438 dot GA970 at domone dot podge> <20140208002308 dot GG32075 at domone dot podge> <1456760 dot YNkU5zRZBf at vapier> <20140210125919 dot GA17330 at domone>
On Mon, Feb 10, 2014 at 01:59:19PM +0100, OndÅej BÃlka wrote:
> On Sat, Feb 08, 2014 at 09:52:32AM -0500, Mike Frysinger wrote:
> > LGTM
> > -mike
>
> I commited a sligthly different version as varlen became unused
> variable.
>
> diff --git a/ChangeLog b/ChangeLog
> index bded2c3..cf1b17d 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,10 @@
> 2014-02-10 OndÅej BÃlka <neleai@seznam.cz>
>
> + [BZ #15894]
> + * stdlib/setenv.c (__add_to_environ): Remove duplicate code.
> +
> +2014-02-10 OndÅej BÃlka <neleai@seznam.cz>
> +
> * malloc/arena.c (grow_heap, get_free_list, reused_arena,
> arena_get2): Remove THREAD_STATS conditionals.
> * malloc/malloc.c (__malloc_assert, __libc_realloc, _int_free,
These need to be collapsed into a single entry separated by a blank
line:
2014-02-10 OndÅej BÃlka <neleai@seznam.cz>
[BZ #15894]
* stdlib/setenv.c (__add_to_environ): Remove duplicate code.
* malloc/arena.c (grow_heap, get_free_list, reused_arena,
arena_get2): Remove THREAD_STATS conditionals.
* malloc/malloc.c (__malloc_assert, __libc_realloc, _int_free,
> @@ -135,7 +135,6 @@ __add_to_environ (name, value, combined, replace)
>
> if (ep == NULL || __builtin_expect (*ep == NULL, 1))
> {
> - const size_t varlen = namelen + 1 + vallen;
> char **new_environ;
>
I think you forgot to do this - I can still see this line and the
build warning it's causing.
Siddhesh