code styling
[psensor.git] / src / lib / nvidia.c
index 54ad724..0a85275 100644 (file)
@@ -75,13 +75,6 @@ static struct psensor *create_sensor(int id, int values_len)
        return s;
 }
 
-static void close_display()
-{
-       XCloseDisplay(display);
-       display = NULL;
-
-}
-
 /*
   Opens connection to X server and returns the number
   of NVidia GPUs.
@@ -124,8 +117,8 @@ void nvidia_psensor_list_update(struct psensor **sensors)
        }
 }
 
-struct psensor * *
-nvidia_psensor_list_add(struct psensor **sensors, int values_len)
+struct psensor **nvidia_psensor_list_add(struct psensor **sensors,
+                                        int values_len)
 {
        int i, n;
        struct psensor **tmp, **ss, *s;
@@ -149,6 +142,8 @@ nvidia_psensor_list_add(struct psensor **sensors, int values_len)
 
 void nvidia_cleanup()
 {
-       if (display) 
-               close_display();
+       if (display) {
+               XCloseDisplay(display);
+               display = NULL;
+       }
 }