use ft_strchr() instead of index()

This commit is contained in:
suzuki toshiya 2011-01-06 12:26:30 +09:00
parent 2acbc01f74
commit 09fe3e314b
2 changed files with 4 additions and 3 deletions

View File

@ -81,6 +81,7 @@
#define ft_memmove memmove
#define ft_memset memset
#define ft_strcat strcat
#define ft_strchr strchr
#define ft_strcmp strcmp
#define ft_strcpy strcpy
#define ft_strlen strlen

View File

@ -525,7 +525,7 @@
return -1;
/* basename not found */
if ( NULL == ( c = strstr( c, source_basename ) ) )
if ( NULL == ( c = ft_strstr( c, source_basename ) ) )
return -1;
/* found position was substring */
@ -542,9 +542,9 @@
return -1;
/* invalid syntax without max memory space */
if ( NULL == index( c + 1, ':' ) )
if ( NULL == ft_strchr( c + 1, ':' ) )
return -1;
c = index( c + 1, ':' );
c = ft_strchr( c + 1, ':' );
if ( !ft_isdigit( c[1] ) )
return -1;