On Thu, Jul 04, 2013 at 10:55:40PM +0300, Mikko Rapeli wrote:
 > Maybe that's all that needs to be done at this point.
 > 
 > Coverity CID 1042335 (#1 of 1): Unchecked return value from library
 > (CHECKED_RETURN)
 > 
 > Signed-off-by: Mikko Rapeli <[email protected]>
 > ---
 >  trinity.c | 9 +++++++--
 >  1 file changed, 7 insertions(+), 2 deletions(-)
 > 
 > diff --git a/trinity.c b/trinity.c
 > index 3f80020..de61dcb 100644
 > --- a/trinity.c
 > +++ b/trinity.c
 > @@ -249,12 +249,17 @@ int main(int argc, char* argv[])
 >  cleanup_fds:
 >  
 >      for (i = 0; i < nr_sockets; i++) {
 > +            int r = 0;
 >              struct linger ling;
 >              memset(&ling, 0, sizeof(ling));
 >  
 >              ling.l_onoff = FALSE;   /* linger active */
 > -            setsockopt(shm->socket_fds[i], SOL_SOCKET, SO_LINGER, &ling, 
 > sizeof(struct linger));
 > -            shutdown(shm->socket_fds[i], SHUT_RDWR);
 > +            r = setsockopt(shm->socket_fds[i], SOL_SOCKET, SO_LINGER, 
 > &ling, sizeof(struct linger));
 > +            if (r)
 > +                    perror("setsockopt");
 > +            r = shutdown(shm->socket_fds[i], SHUT_RDWR);
 > +            if (r)
 > +                    perror("shutdown");
 >              close(shm->socket_fds[i]);
 >      }

Resubmit this one after redoing that linger diff too, as it'll need rebasing.

thanks,

        Dave

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to