Merge branch 'collectd-4.2' into collectd-4.3
[collectd.git] / src / apcups.c
index 08df0b5..5a03764 100644 (file)
@@ -112,7 +112,7 @@ static int apcups_shutdown (void)
  * Returns -1 on error
  * Returns socket file descriptor otherwise
  */
-static int net_open (char *host, char *service, int port)
+static int net_open (char *host, int port)
 {
        int              sd;
        int              status;
@@ -270,7 +270,7 @@ static int apc_query_server (char *host, int port,
 
        if (global_sockfd < 0)
        {
-               global_sockfd = net_open (host, NULL, port);
+               global_sockfd = net_open (host, port);
                if (global_sockfd < 0)
                {
                        ERROR ("apcups plugin: Connecting to the "
@@ -287,7 +287,7 @@ static int apc_query_server (char *host, int port,
 
        while ((n = net_recv (&global_sockfd, recvline, sizeof (recvline) - 1)) > 0)
        {
-               assert (n < sizeof (recvline));
+               assert ((unsigned int)n < sizeof (recvline));
                recvline[n] = '\0';
 #if APCMAIN
                printf ("net_recv = `%s';\n", recvline);