* 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;
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 "
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);