From: Kurt Zeilenga Date: Tue, 4 Mar 2003 21:45:59 +0000 (+0000) Subject: Fix initializer X-Git-Tag: NO_SLAP_OP_BLOCKS~187 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef4e745c58176d8fe311d8782f1301a9e5a7f40a;p=openldap Fix initializer --- diff --git a/libraries/libldap/os-local.c b/libraries/libldap/os-local.c index 024b21bc45..54867fc2f8 100644 --- a/libraries/libldap/os-local.c +++ b/libraries/libldap/os-local.c @@ -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;