projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed close_display fct and moved code directly in nvidia_cleanup
[psensor.git]
/
src
/
lib
/
nvidia.c
diff --git
a/src/lib/nvidia.c
b/src/lib/nvidia.c
index
a1ba14d
..
10d0c65
100644
(file)
--- a/
src/lib/nvidia.c
+++ b/
src/lib/nvidia.c
@@
-75,13
+75,6
@@
static struct psensor *create_sensor(int id, int values_len)
return s;
}
return s;
}
-static void close_display()
-{
- XCloseDisplay(display);
- display = NULL;
-
-}
-
/*
Opens connection to X server and returns the number
of NVidia GPUs.
/*
Opens connection to X server and returns the number
of NVidia GPUs.
@@
-149,6
+142,8
@@
nvidia_psensor_list_add(struct psensor **sensors, int values_len)
void nvidia_cleanup()
{
void nvidia_cleanup()
{
- if (display)
- close_display();
+ if (display) {
+ XCloseDisplay(display);
+ display = NULL;
+ }
}
}