Audit slstatus.c
authorLaslo Hunhold <dev@frign.de>
Fri, 18 May 2018 08:07:50 +0000 (10:07 +0200)
committerAaron Marcher <me@drkhsh.at>
Fri, 18 May 2018 08:08:03 +0000 (10:08 +0200)
commita4fe8c97414f07dd8b891e0d325dd2733195151d
tree36537e30e965eb79481e6878bada658c2342745e
parentc83b388a3f8f7a8c8d5a5cfddb6ab397005371a1
Audit slstatus.c

 1) Remove setlocale() (locales are harmful and any 'issues' shall
    be fixed in different ways that are expected).
 2) Disable buffering on stdout with setbuf() rather than flushing
    it each time.
 3) Make error messages more consistent.
 4) Add error checks where applicable.
 5) Make code a bit more readable where res is assigned.
 6) Use XFlush() rather than XSync() (we don't need to wait for the
    XServer to react, which could lead to long hangs on our side).
slstatus.c