From 3e0929ce3dd55df9fe27ffae6080aea596277615 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Tue, 8 Sep 2020 16:00:13 +0200 Subject: [PATCH] Clean the code a bit I ran splint on the code and it complained a lot... --- dirot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dirot.c b/dirot.c index 9f3014d..29ae7a0 100644 --- a/dirot.c +++ b/dirot.c @@ -2,8 +2,6 @@ #include #include #include -#include -#include void test_and_fail(void *ptr, char *msg) { if (ptr == NULL) { @@ -25,7 +23,6 @@ int main (void) { test_and_fail(dpy, "Could not open display"); int screen_number = XDefaultScreen(dpy); - Screen *screen = XDefaultScreenOfDisplay(dpy); Window root = XRootWindow(dpy, screen_number); // TODO: Early check that RandR is supported by dpy @@ -42,5 +39,6 @@ int main (void) { XRRSetScreenConfig(dpy, cfg, root, XRRConfigCurrentConfiguration(cfg, &cfg_rot), new, XRRConfigTimes(cfg, &cfg_ts)); XRRFreeScreenConfigInfo(cfg); + XCloseDisplay(dpy); return 0; }