File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,10 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
559559#ifdef ZMQ_HAVE_IPC
560560 ipc_address_t address;
561561 std::string dirname, filename;
562+ sockaddr_un lcladdr;
563+ socklen_t lcladdr_len = sizeof lcladdr;
564+ int rc = 0 ;
565+ int saved_errno = 0 ;
562566
563567 // Create a listening socket.
564568 const SOCKET listener = open_socket (AF_UNIX, SOCK_STREAM, 0 );
@@ -570,7 +574,7 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
570574 create_ipc_wildcard_address (dirname, filename);
571575
572576 // Initialise the address structure.
573- int rc = address.resolve (filename.c_str ());
577+ rc = address.resolve (filename.c_str ());
574578 if (rc != 0 ) {
575579 goto error_closelistener;
576580 }
@@ -590,9 +594,6 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
590594 goto error_closelistener;
591595 }
592596
593- sockaddr_un lcladdr;
594- socklen_t lcladdr_len = sizeof lcladdr;
595-
596597 rc = getsockname (listener, reinterpret_cast <struct sockaddr *> (&lcladdr),
597598 &lcladdr_len);
598599 wsa_assert (rc != -1 );
@@ -621,7 +622,7 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
621622 return 0 ;
622623
623624error_closeclient:
624- int saved_errno = errno;
625+ saved_errno = errno;
625626 rc = closesocket (*w_);
626627 wsa_assert (rc == 0 );
627628 errno = saved_errno;
You can’t perform that action at this time.
0 commit comments