projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git]
/
src
/
multimeter.c
diff --git
a/src/multimeter.c
b/src/multimeter.c
index
775eb57
..
03608e6
100644
(file)
--- a/
src/multimeter.c
+++ b/
src/multimeter.c
@@
-153,9
+153,9
@@
static int multimeter_init (void)
for (i = 0; i < 10; i++)
{
for (i = 0; i < 10; i++)
{
- device[strlen(device)-1] = i + '0';
+ device[strlen(device)-1] = i + '0';
- if ((fd = open(device, O_RDWR | O_NOCTTY))
> 0
)
+ if ((fd = open(device, O_RDWR | O_NOCTTY))
!= -1
)
{
struct termios tios;
int rts = TIOCM_RTS;
{
struct termios tios;
int rts = TIOCM_RTS;
@@
-171,7
+171,7
@@
static int multimeter_init (void)
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tios);
ioctl(fd, TIOCMBIC, &rts);
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tios);
ioctl(fd, TIOCMBIC, &rts);
-
+
if (multimeter_read_value (&value) < -1)
{
close (fd);
if (multimeter_read_value (&value) < -1)
{
close (fd);