Change-Id: Icded479d246f7cce8a3d2154c69f75178fa513e1 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://review.coreboot.org/708 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins) Reviewed-by: Mathias Krause <minipli@googlemail.com>
		
			
				
	
	
		
			12 lines
		
	
	
		
			192 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			192 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <string.h>
 | 
						|
void *memchr(const void *s, int c, size_t n)
 | 
						|
{
 | 
						|
	const unsigned char *sc = s;
 | 
						|
	while (n--) {
 | 
						|
		if (*sc == (unsigned char)c)
 | 
						|
			return (void *)sc;
 | 
						|
		sc++;
 | 
						|
	}
 | 
						|
	return NULL;
 | 
						|
}
 |