summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b2f7aa)
raw | patch | inline | side by side (parent: 4b2f7aa)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 24 Nov 2008 18:23:25 +0000 (19:23 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 24 Nov 2008 18:23:25 +0000 (19:23 +0100) |
This resolves warnings when compiling on GNU with:
CPPFLAGS="-D_FORTIFY_SOURCE"
CPPFLAGS="-D_FORTIFY_SOURCE"
src/multimeter.c | patch | blob | history |
diff --git a/src/multimeter.c b/src/multimeter.c
index c6b070a035691a2cbabd3c816231444448892ea5..db3574605e5961f033d5648b3d9354368333f607 100644 (file)
--- a/src/multimeter.c
+++ b/src/multimeter.c
struct timeval timeout;
struct timeval time_now;
- write(fd, "D", 1);
+ status = swrite (fd, "D", 1);
+ if (status < 0)
+ {
+ ERROR ("multimeter plugin: swrite failed.");
+ return (-1);
+ }
FD_ZERO(&rfds);
FD_SET(fd, &rfds);