From patchwork Sat Nov 7 21:03:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 58378 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA7L6FtX019420 for ; Sat, 7 Nov 2009 21:06:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753147AbZKGVEb (ORCPT ); Sat, 7 Nov 2009 16:04:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752940AbZKGVEb (ORCPT ); Sat, 7 Nov 2009 16:04:31 -0500 Received: from mxout-08.mxes.net ([216.86.168.183]:39949 "EHLO mxout-08.mxes.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbZKGVEW (ORCPT ); Sat, 7 Nov 2009 16:04:22 -0500 Received: from localhost.localdomain (unknown [86.53.68.233]) by smtp.mxes.net (Postfix) with ESMTPA id 86B7E509E1; Sat, 7 Nov 2009 16:04:26 -0500 (EST) From: Alan Jenkins To: rusty@rustcorp.com.au Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Alan Jenkins Subject: [PATCH 08/10] lib: bsearch - remove redundant special case for arrays of size 0 Date: Sat, 7 Nov 2009 21:03:59 +0000 Message-Id: <1257627841-15817-8-git-send-email-alan-jenkins@tuffmail.co.uk> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <4AF5DF9F.5020208@tuffmail.co.uk> References: <4AF5DF9F.5020208@tuffmail.co.uk> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org diff --git a/lib/bsearch.c b/lib/bsearch.c index 4297c98..2e70664 100644 --- a/lib/bsearch.c +++ b/lib/bsearch.c @@ -34,8 +34,6 @@ void *bsearch(const void *key, const void *base, size_t num, size_t size, int (*cmp)(const void *key, const void *elt)) { int start = 0, end = num - 1, mid, result; - if (num == 0) - return NULL; while (start <= end) { mid = (start + end) / 2;