]> git.sur5r.net Git - openldap/commitdiff
Fix initializer
authorKurt Zeilenga <kurt@openldap.org>
Tue, 4 Mar 2003 21:45:59 +0000 (21:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 4 Mar 2003 21:45:59 +0000 (21:45 +0000)
libraries/libldap/os-local.c

index 024b21bc450149077eb3280e1ff0573c096c13df..54867fc2f859f535a9c407d4ba8f16eb49061927 100644 (file)
@@ -139,6 +139,8 @@ ldap_pvt_is_socket_ready(LDAP *ld, int s)
        !defined(SO_PEERCRED) && !defined(LOCAL_PEERCRED) && \
        defined(HAVE_SENDMSG) && defined(HAVE_MSGHDR_MSG_ACCRIGHTS)
 #define DO_SENDMSG
+static const char abandonPDU[] = {LDAP_TAG_MESSAGE, 6,
+       LDAP_TAG_MSGID, 1, 0, LDAP_REQ_ABANDON, 1, 0};
 #endif
 
 static int
@@ -173,9 +175,7 @@ sendcred:
                {
                        int fds[2];
                        /* Abandon, noop, has no reply */
-                       char txt[] = {LDAP_TAG_MESSAGE, 6,
-                               LDAP_TAG_MSGID, 1, 0, LDAP_REQ_ABANDON, 1, 0};
-                       struct iovec iov = {txt, sizeof(txt)};
+                       struct iovec iov = {abandonPDU, sizeof(abandonPDU)};
                        struct msghdr msg = {0};
                        if (pipe(fds) == 0) {
                                msg.msg_iov = &iov;