This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^6][BZ #15894][PATCH] Deduplicate setenv.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]