projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revert back to DEBUG
[collectd.git]
/
src
/
wireless.c
diff --git
a/src/wireless.c
b/src/wireless.c
index
ae77ded
..
2e597f3
100644
(file)
--- a/
src/wireless.c
+++ b/
src/wireless.c
@@
-47,7
+47,7
@@
static double wireless_dbm_to_watt (double dbm)
watt = pow (10.0, (dbm / 10.0)) / 1000.0;
watt = pow (10.0, (dbm / 10.0)) / 1000.0;
- return
(watt)
;
+ return
watt
;
}
#endif
}
#endif
@@
-69,7
+69,7
@@
static void wireless_submit(const char *plugin_instance, const char *type,
static double wireless_percent_to_power(double quality) {
assert((quality >= 0.0) && (quality <= 100.0));
static double wireless_percent_to_power(double quality) {
assert((quality >= 0.0) && (quality <= 100.0));
- return (
(quality * (POWER_MAX - POWER_MIN)) + POWER_MIN)
;
+ return (
quality * (POWER_MAX - POWER_MIN)) + POWER_MIN
;
} /* double wireless_percent_to_power */
static int wireless_read(void) {
} /* double wireless_percent_to_power */
static int wireless_read(void) {
@@
-86,13
+86,12
@@
static int wireless_read(void) {
int numfields;
int devices_found;
int numfields;
int devices_found;
-
in
t len;
+
size_
t len;
/* there are a variety of names for the wireless device */
if ((fh = fopen(WIRELESS_PROC_FILE, "r")) == NULL) {
/* there are a variety of names for the wireless device */
if ((fh = fopen(WIRELESS_PROC_FILE, "r")) == NULL) {
- char errbuf[1024];
- WARNING("wireless: fopen: %s", sstrerror(errno, errbuf, sizeof(errbuf)));
- return (-1);
+ WARNING("wireless: fopen: %s", STRERRNO);
+ return -1;
}
devices_found = 0;
}
devices_found = 0;
@@
-151,10
+150,10
@@
static int wireless_read(void) {
/* If no wireless devices are present return an error, so the plugin
* code delays our read function. */
if (devices_found == 0)
/* If no wireless devices are present return an error, so the plugin
* code delays our read function. */
if (devices_found == 0)
- return
(-1)
;
+ return
-1
;
#endif /* KERNEL_LINUX */
#endif /* KERNEL_LINUX */
- return
(0)
;
+ return
0
;
} /* int wireless_read */
void module_register(void) {
} /* int wireless_read */
void module_register(void) {