diff options
Diffstat (limited to 'gnulib/lib/memmem.c')
-rw-r--r-- | gnulib/lib/memmem.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gnulib/lib/memmem.c b/gnulib/lib/memmem.c index fdf8c91..99f3a67 100644 --- a/gnulib/lib/memmem.c +++ b/gnulib/lib/memmem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007,2008 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see <http://www.gnu.org/licenses/>. */ /* This particular implementation was written by Eric Blake, 2008. */ @@ -38,7 +37,7 @@ HAYSTACK. */ void * memmem (const void *haystack_start, size_t haystack_len, - const void *needle_start, size_t needle_len) + const void *needle_start, size_t needle_len) { /* Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ @@ -63,10 +62,10 @@ memmem (const void *haystack_start, size_t haystack_len, { haystack = memchr (haystack, *needle, haystack_len); if (!haystack || __builtin_expect (needle_len == 1, 0)) - return (void *) haystack; + return (void *) haystack; haystack_len -= haystack - (const unsigned char *) haystack_start; if (haystack_len < needle_len) - return NULL; + return NULL; return two_way_short_needle (haystack, haystack_len, needle, needle_len); } else |