This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.23-149-g2e51bc3
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Apr 2016 21:34:26 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.23-149-g2e51bc3
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 2e51bc3813ca3fe72fd197d08d79496e46669f43 (commit)
from 344303f3cfc072469c7c32de90952871c108afd5 (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=2e51bc3813ca3fe72fd197d08d79496e46669f43
commit 2e51bc3813ca3fe72fd197d08d79496e46669f43
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Apr 1 18:33:03 2016 -0300
Use PTR_ALIGN_DOWN on strcspn and strspn
Tested on aarch64.
* string/strcspn.c (strcspn): Use PTR_ALIGN_DOWN.
* string/strspn.c (strspn): Likewise.
diff --git a/ChangeLog b/ChangeLog
index fc86116..c181042 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-01 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * string/strcspn.c (strcspn): Use PTR_ALIGN_DOWN.
+ * string/strspn.c (strspn): Likewise.
+
2016-04-01 H.J. Lu <hongjiu.lu@intel.com>
* benchtests/bench-memset.c (do_test): Support 64-byte
diff --git a/string/strcspn.c b/string/strcspn.c
index c535dd1..0e01193 100644
--- a/string/strcspn.c
+++ b/string/strcspn.c
@@ -17,6 +17,7 @@
#include <string.h>
#include <stdint.h>
+#include <libc-internal.h>
#undef strcspn
@@ -52,7 +53,7 @@ STRCSPN (const char *str, const char *reject)
if (p[s[2]]) return 2;
if (p[s[3]]) return 3;
- s = (unsigned char *) ((uintptr_t)(s) & ~3);
+ s = (unsigned char *) PTR_ALIGN_DOWN (s, 4);
unsigned int c0, c1, c2, c3;
do
diff --git a/string/strspn.c b/string/strspn.c
index f98340b..86f76ea 100644
--- a/string/strspn.c
+++ b/string/strspn.c
@@ -17,6 +17,7 @@
#include <string.h>
#include <stdint.h>
+#include <libc-internal.h>
#undef strspn
#ifndef STRSPN
@@ -58,7 +59,8 @@ STRSPN (const char *str, const char *accept)
if (!p[s[2]]) return 2;
if (!p[s[3]]) return 3;
- s = (unsigned char *) ((uintptr_t)(s) & ~3);
+ s = (unsigned char *) PTR_ALIGN_DOWN (s, 4);
+
unsigned int c0, c1, c2, c3;
do {
s += 4;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
string/strcspn.c | 3 ++-
string/strspn.c | 4 +++-
3 files changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources