Code cleanup

This commit is contained in:
Pierre Pronchery 2012-12-23 16:19:57 +01:00
parent 56ebc2c3b6
commit b249e227e2

View File

@ -1048,6 +1048,7 @@ static int _current_loop_applications(Desktop * desktop)
struct dirent * de;
size_t len;
const char ext[] = ".desktop";
const char section[] = "Desktop Entry";
char * path = NULL;
char * p;
Config * config;
@ -1083,8 +1084,7 @@ static int _current_loop_applications(Desktop * desktop)
config_reset(config);
if(config_load(config, path) != 0)
continue;
if((q = config_get(config, "Desktop Entry", "Categories"))
== NULL)
if((q = config_get(config, section, "Categories")) == NULL)
continue;
if(string_find(q, desktop->category->category) == NULL)
continue;