Performance ECC-480: strchr is faster

This commit is contained in:
Shahram Najm 2017-06-29 15:48:42 +01:00
parent 76bf86849b
commit a105adb9cb
1 changed files with 3 additions and 3 deletions

View File

@ -405,11 +405,11 @@ static grib_accessor* search_and_cache(grib_handle* h, const char* name,const ch
static grib_accessor* _grib_find_accessor(grib_handle* h, const char* name)
{
grib_accessor* a = NULL;
char* p = (char*)name;
char* p = NULL;
DebugAssert(name);
while ( *p != '.' && *p != '\0' ) p++;
if ( *p == '.' ) {
p = strchr(name, '.');
if ( p ) {
int i=0,len=0;
char name_space[MAX_NAMESPACE_LEN];
char* basename=NULL;