This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.22-551-g87d0eec


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  87d0eecece0ecefaca6a7eedb715cb823b3ef780 (commit)
      from  2359035ac52db69eb427c3b4b9d9297c98d2b225 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87d0eecece0ecefaca6a7eedb715cb823b3ef780

commit 87d0eecece0ecefaca6a7eedb715cb823b3ef780
Author: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Date:   Tue Nov 24 16:19:32 2015 +0000

    malloc: remove redundant getenv call
    
    * malloc/memusage.c (me): Remove redundant getenv call.

diff --git a/ChangeLog b/ChangeLog
index e16ad2c..0c8e4b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-24  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>
+
+	* malloc/memusage.c (me): Remove redundant getenv call.
+
 2015-10-24  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #19143]
diff --git a/malloc/memusage.c b/malloc/memusage.c
index a57ba8e..6de3344 100644
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -276,9 +276,10 @@ me (void)
               /* Determine the buffer size.  We use the default if the
                  environment variable is not present.  */
               buffer_size = DEFAULT_BUFFER_SIZE;
-              if (getenv ("MEMUSAGE_BUFFER_SIZE") != NULL)
+              const char *str_buffer_size = getenv ("MEMUSAGE_BUFFER_SIZE");
+              if (str_buffer_size != NULL)
                 {
-                  buffer_size = atoi (getenv ("MEMUSAGE_BUFFER_SIZE"));
+                  buffer_size = atoi (str_buffer_size);
                   if (buffer_size == 0 || buffer_size > DEFAULT_BUFFER_SIZE)
                     buffer_size = DEFAULT_BUFFER_SIZE;
                 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    4 ++++
 malloc/memusage.c |    5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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