]> git.sur5r.net Git - openldap/commitdiff
Minor cleanup for sendmsg
authorHoward Chu <hyc@openldap.org>
Tue, 4 Mar 2003 22:14:57 +0000 (22:14 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 4 Mar 2003 22:14:57 +0000 (22:14 +0000)
libraries/libldap/os-local.c

index 54867fc2f859f535a9c407d4ba8f16eb49061927..aef423150edfd9734912e730bdbfeacd29d06998 100644 (file)
@@ -174,10 +174,10 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s, struct sockaddr_un *sa, int async)
 sendcred:
                {
                        int fds[2];
-                       /* Abandon, noop, has no reply */
-                       struct iovec iov = {abandonPDU, sizeof(abandonPDU)};
-                       struct msghdr msg = {0};
                        if (pipe(fds) == 0) {
+                               /* Abandon, noop, has no reply */
+                               struct iovec iov = {abandonPDU, sizeof(abandonPDU)};
+                               struct msghdr msg = {0};
                                msg.msg_iov = &iov;
                                msg.msg_iovlen = 1;
                                msg.msg_accrights = (char *)fds;