[collectd] [PATCH] ping plugin: Do not use the address of getuid() but the return value.

Sebastian Harl sh at tokkee.org
Mon Jun 18 16:59:36 CEST 2007


Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/ping.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ping.c b/src/ping.c
index 3c70066..27a65fa 100644
--- a/src/ping.c
+++ b/src/ping.c
@@ -241,7 +241,7 @@ static int ping_read (void)
 		number_of_hosts++;
 	}
 
-	if ((number_of_hosts == 0) && (getuid != 0))
+	if ((number_of_hosts == 0) && (getuid () != 0))
 	{
 		ERROR ("ping plugin: All hosts failed. Try starting collectd as root.");
 	}
-- 
1.5.1.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070618/a3ad8a76/attachment.pgp 


More information about the collectd mailing list