projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
style
[psensor.git]
/
src
/
lib
/
nvidia.c
diff --git
a/src/lib/nvidia.c
b/src/lib/nvidia.c
index
9e86228
..
4f2c67a
100644
(file)
--- a/
src/lib/nvidia.c
+++ b/
src/lib/nvidia.c
@@
-50,13
+50,11
@@
static char *get_product_name(int id, int type)
NV_CTRL_STRING_PRODUCT_NAME,
&name);
if (res == True) {
NV_CTRL_STRING_PRODUCT_NAME,
&name);
if (res == True) {
- if (strcmp(name, "Unknown"))
{
+ if (strcmp(name, "Unknown"))
return name;
return name;
- } else {
- log_err(_("Unknown NVIDIA product name for GPU %d"),
- id);
- free(name);
- }
+
+ log_err(_("Unknown NVIDIA product name for GPU %d"), id);
+ free(name);
} else {
log_err(_("Failed to retrieve NVIDIA product name for GPU %d"),
id);
} else {
log_err(_("Failed to retrieve NVIDIA product name for GPU %d"),
id);
@@
-74,8
+72,8
@@
static double get_att(int target, int id, int att)
if (res == True)
return temp;
if (res == True)
return temp;
- else
-
return UNKNOWN_DBL_VALUE;
+
+ return UNKNOWN_DBL_VALUE;
}
static double get_usage_att(char *atts, const char *att)
}
static double get_usage_att(char *atts, const char *att)
@@
-151,8
+149,8
@@
static const char *get_nvidia_type_str(int type)
if (type & SENSOR_TYPE_FAN) {
if (type & SENSOR_TYPE_RPM)
return "fan rpm";
if (type & SENSOR_TYPE_FAN) {
if (type & SENSOR_TYPE_RPM)
return "fan rpm";
- else
-
return "fan level";
+
+ return "fan level";
}
return "unknown";
}
return "unknown";