Two spots:

First, why using

/*
 * tiny comment
 */

instead of
/* tiny comment */

Second, why introducing superfluous scope brackets?

I prefer

if (!(dpy = XOpenDisplay(0)))
    die("cannot open display\n");


to cumbersome:

if (!(dpy = XOpenDisplay(NULL))) {
    die("slock: cannot open display\n");
}

BR,
Anselm


On 22 August 2016 at 09:14, FRIGN <[email protected]> wrote:
> Good morning fellow hackers,
>
> after discussing this with Markus we agreed that it is time for slock
> to have a refactor so it benefits from all the best practices(tm) we
> learned about in the last few years and worked out working on sbase and
> other projects.
>
> In the long run the target is to go through each function and very
> strictly do error checks where necessary and also reduce global state
> where it might be a problem. Given slock is suid, we don't want to take
> any risks and provide as little attack surface as possible.
>
> Besides stricter error checking this patch also improves the usage and
> makes the code more readable by pulling in arg.h, which has proven to
> be very useful in the last few years.
>
> Please provide feedback on this patch and test it.
>
> Cheers
>
> FRIGN
>
> --
> FRIGN <[email protected]>

Reply via email to