Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81616181A9 for ; Wed, 19 Aug 2015 09:57:49 +0000 (UTC) Received: (qmail 59762 invoked by uid 500); 19 Aug 2015 09:57:44 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 59679 invoked by uid 500); 19 Aug 2015 09:57:44 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 59669 invoked by uid 99); 19 Aug 2015 09:57:44 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2015 09:57:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A0C7CDF1DE for ; Wed, 19 Aug 2015 09:57:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CAP1e7eHC1dH for ; Wed, 19 Aug 2015 09:57:34 +0000 (UTC) Received: from node176.itex.at (mail.123x.at [194.242.35.176]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id F012E42B21 for ; Wed, 19 Aug 2015 09:57:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by node176.itex.at (Postfix) with ESMTP id 0D38F22A99 for ; Wed, 19 Aug 2015 11:57:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at node176.itex.at Received: from node176.itex.at ([127.0.0.1]) by localhost (node176.itex.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y7AafmF7oFGp for ; Wed, 19 Aug 2015 11:57:32 +0200 (CEST) Received: from [10.202.65.180] (unknown [101.174.192.10]) (Authenticated sender: normw@gknw.net) by node176.itex.at (Postfix) with ESMTPSA id AD34122AC5 for ; Wed, 19 Aug 2015 11:57:30 +0200 (CEST) To: dev@httpd.apache.org From: NormW Subject: C89-ify a recent change to h2_io_set.c Message-ID: <55D4530B.8000901@gknw.net> Date: Wed, 19 Aug 2015 19:57:31 +1000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit G/Evening (Is here) A very small tweak is proposed for: httpd-trunk\modules\http2\h2_io_set.c to keep the C89-ers in their seats. The svn diff looks like: Index: modules/http2/h2_io_set.c =================================================================== --- modules/http2/h2_io_set.c (revision 1696548) +++ modules/http2/h2_io_set.c (working copy) @@ -67,12 +67,13 @@ /* we keep the array sorted by id, so lookup can be done * by bsearch. */ + h2_io **ps; h2_io key; h2_io *pkey = &key; memset(&key, 0, sizeof(key)); key.id = stream_id; - h2_io **ps = bsearch(&pkey, sp->list->elts, sp->list->nelts, + ps = bsearch(&pkey, sp->list->elts, sp->list->nelts, sp->list->elt_size, h2_stream_id_cmp); return ps? *ps : NULL; } I won't bore anyone who can follow that module with a patch. Cheers, Norm