char recvline[1024];
char *tokptr;
char *toksaveptr;
- int try = 0;
+ int try
+ = 0;
int status;
#if APCMAIN
/* net_send closes the socket on error. */
assert(global_sockfd < 0);
if (try == 0) {
- try++;
+ try
+ ++;
count_retries++;
continue;
}
net_shutdown(&global_sockfd);
if (n < 0) {
- char errbuf[1024];
- ERROR("apcups plugin: Reading from socket failed: %s",
- sstrerror(status, errbuf, sizeof(errbuf)));
+ ERROR("apcups plugin: Reading from socket failed: %s", STRERROR(status));
return -1;
}