all repos — slstatus @ 0a287616b2e3122a1b149e28d63560819bcdf7c9

my build of slstatus (tools.suckless.org/slstatus/)

num_files: Variable declarations at top of block
Aaron Marcher me@drkhsh.at
Mon, 07 May 2018 12:17:13 +0200
commit

0a287616b2e3122a1b149e28d63560819bcdf7c9

parent

dcffaeaf570e6dde5745080e533b5404ebc0e610

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M components/num_files.ccomponents/num_files.c

@@ -11,13 +11,14 @@ num_files(const char *dir)

{ struct dirent *dp; DIR *fd; - int num = 0; + int num; if (!(fd = opendir(dir))) { fprintf(stderr, "opendir '%s': %s\n", dir, strerror(errno)); return NULL; } + num = 0; while ((dp = readdir(fd))) { if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) { continue; /* skip self and parent */