Skip to content

Commit

Permalink
[BZ #2751]
Browse files Browse the repository at this point in the history
2006-05-15  Mike Frysinger  <vapier@gentoo.org>
	[BZ #2751]
	* string/strchr.c: Add cast to avoid warning.
  • Loading branch information
Ulrich Drepper committed Aug 22, 2006
1 parent bd2c234 commit 59776ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2006-05-15 Mike Frysinger <vapier@gentoo.org>

[BZ #2751]
* string/strchr.c: Add cast to avoid warning.

2006-08-21 Ulrich Drepper <drepper@redhat.com>

* malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit
Expand Down
7 changes: 4 additions & 3 deletions string/strchr.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Copyright (C) 1991,93,94,95,96,97,99,2000,03 Free Software Foundation, Inc.
/* Copyright (C) 1991,1993-1997,1999,2000,2003,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
Expand Down Expand Up @@ -42,8 +43,8 @@ strchr (s, c_in)

/* Handle the first few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
for (char_ptr = s; ((unsigned long int) char_ptr
& (sizeof (longword) - 1)) != 0;
for (char_ptr = (const unsigned char *) s;
((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
++char_ptr)
if (*char_ptr == c)
return (void *) char_ptr;
Expand Down

0 comments on commit 59776ae

Please sign in to comment.