X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fcrawl_folders.c;h=b59a8e7ea718440fc5f2ca21621d8f491c936544;hb=8aeebaf757a1588ae2836965f5443ca7dc3a0257;hp=0693a2162b376944b20f04daaece627e55e8308c;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/sbr/crawl_folders.c b/sbr/crawl_folders.c index 0693a21..b59a8e7 100644 --- a/sbr/crawl_folders.c +++ b/sbr/crawl_folders.c @@ -9,11 +9,13 @@ #include #include #include +#include +#include struct crawl_context { int max; /* - ** how many folders we currently can hold in the array - ** `folders', increased by CRAWL_NUMFOLDERS at a time + ** number of folders we can hold in the folders array; + ** increased by CRAWL_NUMFOLDERS at a time */ int total; /* how many `folders' actually has */ char **folders; /* the array of folders */ @@ -84,7 +86,8 @@ add_children(char *name, struct crawl_context *crawl) continue; } #endif - if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) { + if (strcmp(dp->d_name, ".")==0 || + strcmp(dp->d_name, "..")==0) { continue; } child = concat(prefix, dp->d_name, (void *)NULL);