Don't use strlen to check if a string is empty

SVN revision: 18268
This commit is contained in:
sebastid 2005-11-04 07:54:26 +00:00 committed by sebastid
parent 0b399a3c1a
commit 4bb7c433de
2 changed files with 2 additions and 2 deletions

View File

@ -1541,7 +1541,7 @@ _ecore_config_system_init_no_load(void)
return ECORE_CONFIG_ERR_IGNORED;
DEBUG = -1;
if ((p = getenv("ECORE_CONFIG_DEBUG")) && strlen(p) > 0)
if ((p = getenv("ECORE_CONFIG_DEBUG")) && p[0] != 0)
{
DEBUG = atoi(p);
}

View File

@ -113,7 +113,7 @@ _ecore_config_recurse_mkdir(const char *file)
file_ptr--;
*file_ptr = '\0';
if ((strlen(file_tmp) > 0) && stat(file_tmp, &status))
if ((file_tmp[0] != 0) && stat(file_tmp, &status))
{
_ecore_config_recurse_mkdir(file_tmp);
mkdir(file_tmp, S_IRUSR | S_IWUSR | S_IXUSR);