]> git.sur5r.net Git - i3/i3lock/blobdiff - xinerama.c
Merge pull request #135 from grandchild/fix_optind_overwrite
[i3/i3lock] / xinerama.c
index 6a3557cc99abeb48ac8d441e211625c0f58c3774..3a1c7565b6377cd8acf494d902f0b0be1fa71979 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * vim:ts=4:sw=4:expandtab
  *
- * © 2010-2012 Michael Stapelberg
+ * © 2010 Michael Stapelberg
  *
  * See LICENSE for licensing information
  *
@@ -26,7 +26,7 @@ Rect *xr_resolutions;
 static bool xinerama_active;
 extern bool debug_mode;
 
-void xinerama_init() {
+void xinerama_init(void) {
     if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
         DEBUG("Xinerama extension not found, disabling.\n");
         return;
@@ -46,9 +46,10 @@ void xinerama_init() {
     }
 
     xinerama_active = true;
+    free(reply);
 }
 
-void xinerama_query_screens() {
+void xinerama_query_screens(void) {
     if (!xinerama_active)
         return;
 
@@ -81,8 +82,8 @@ void xinerama_query_screens() {
         xr_resolutions[screen].width = screen_info[screen].width;
         xr_resolutions[screen].height = screen_info[screen].height;
         DEBUG("found Xinerama screen: %d x %d at %d x %d\n",
-                        screen_info[screen].width, screen_info[screen].height,
-                        screen_info[screen].x_org, screen_info[screen].y_org);
+              screen_info[screen].width, screen_info[screen].height,
+              screen_info[screen].x_org, screen_info[screen].y_org);
     }
 
     free(reply);