Skip to content

Commit

Permalink
Add comments and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
zdohnal committed Dec 14, 2023
1 parent ef36588 commit 68b9052
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cups/http-addrlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,12 @@ httpAddrConnect2(
// check the SO_ERROR value and ignore the POLLHUP if there is no error or
// the error is EINPROGRESS.

int sres, serr;
socklen_t slen = sizeof(serr);
int sres, /* Return value from getsockopt() - 0, or -1 if error */
serr; /* Option SO_ERROR value */
socklen_t slen = sizeof(serr); /* Option value size */

sres = getsockopt(fds[i], SOL_SOCKET, SO_ERROR, &serr, &slen);

if (sres || serr)
{
pfds[i].revents |= POLLERR;
Expand Down

0 comments on commit 68b9052

Please sign in to comment.