From: Laslo Hunhold Date: Fri, 18 May 2018 08:07:50 +0000 (+0200) Subject: Audit slstatus.c X-Git-Url: https://git.xinqibao.xyz/slstatus.git/commitdiff_plain/a4fe8c97414f07dd8b891e0d325dd2733195151d?hp=a4fe8c97414f07dd8b891e0d325dd2733195151d 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). ---