all repos — slstatus @ aa70b6633016ed35f9fa3d91c26751e973ac5d63

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

opened the file before the path concatenates, what an idiot
Ali H. Fardan raiz@firemail.cc
Wed, 31 Aug 2016 14:29:27 +0300
commit

aa70b6633016ed35f9fa3d91c26751e973ac5d63

parent

5e4dc85bb9bf821d87bcf8a13e0f0843fd68bfe1

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

jump to
M slstatus.cslstatus.c

@@ -564,11 +564,13 @@ char *datastart;

char path[64]; char status[5]; char needle[strlen(wificard)+2]; - FILE *fp = fopen(path, "r"); + FILE *fp; strlcpy(path, "/sys/class/net/", sizeof(path)); strlcat(path, wificard, sizeof(path)); strlcat(path, "/operstate", sizeof(path)); + + fp = fopen(path, "r"); if(fp == NULL) { fprintf(stderr, "Error opening wifi operstate file: %s\n",