From 68b905224411b6639a9857ed2f5127d6fa0674f0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 14 Dec 2023 09:37:00 +0100 Subject: [PATCH] Add comments and coding style --- cups/http-addrlist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c index 81874313d7..436e21f8a2 100644 --- a/cups/http-addrlist.c +++ b/cups/http-addrlist.c @@ -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;