Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_desktop Modified Files: ecore_desktop_icon.c Log Message: No need to use strlen twice. =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_icon.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- ecore_desktop_icon.c 22 Sep 2006 14:55:43 -0000 1.23 +++ ecore_desktop_icon.c 23 Sep 2006 08:33:53 -0000 1.24 @@ -1,3 +1,6 @@ +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ #include <limits.h> #include "Ecore_Desktop.h" @@ -75,12 +78,13 @@ ecore_list_goto_first(icons); while ((icn = (char *)ecore_list_next(icons))) { + char *ext; #ifdef DEBUG fprintf(stderr, "\tTrying To Find Icon %s\n", icn); #endif + ext = strrchr(icn, '.'); /* Check for unsupported extension */ - if ((strlen(icn) > 4) && (!strcmp(icn + strlen(icn) - 4, ".ico"))) - continue; + if ((ext) && (!strcmp(ext, ".ico"))) continue; dir = _ecore_desktop_icon_find0(icn, icon_size, icon_theme); if (dir) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs