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.24-668-g9c8e644


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  9c8e64485360d08d95884bddc0958cf3a5ca9c5c (commit)
      from  4283b387253eb68647bd4c91f9d6ac615982919f (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=9c8e64485360d08d95884bddc0958cf3a5ca9c5c

commit 9c8e64485360d08d95884bddc0958cf3a5ca9c5c
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Feb 1 14:37:58 2017 -0800

    alpha: Use saturating arithmetic in memchr

diff --git a/ChangeLog b/ChangeLog
index f9b94fb..b2f41e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-01  Richard Henderson  <rth@twiddle.net>
+
+	* sysdeps/alpha/memchr.c (__memchr): Use saturating arithmetic
+	adjusting the byte count.
+
 2017-02-01  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* conform/Makefile (linknamespace-libs): Define.
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index 82c42c0..402088d 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -53,7 +53,10 @@ __memchr (const void *s, int xc, size_t n)
   /* Align the source, and decrement the count by the number
      of bytes searched in the first word.  */
   s_align = (const word *)((word)s & -8);
-  n += ((word)s & 7);
+  {
+    size_t inc = n + ((word)s & 7);
+    n = inc | -(inc < n);
+  }
 
   /* Deal with misalignment in the first word for the comparison.  */
   mask = (1ul << ((word)s & 7)) - 1;

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

Summary of changes:
 ChangeLog              |    5 +++++
 sysdeps/alpha/memchr.c |    5 ++++-
 2 files changed, 9 insertions(+), 1 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]