From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 02:23:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA6DE961; Mon, 13 Oct 2014 02:23:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AE1A4E; Mon, 13 Oct 2014 02:23:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9D2NOJD032955; Mon, 13 Oct 2014 02:23:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9D2NOCY032954; Mon, 13 Oct 2014 02:23:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410130223.s9D2NOCY032954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Oct 2014 02:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273020 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 02:23:25 -0000 Author: ngie Date: Mon Oct 13 02:23:24 2014 New Revision: 273020 URL: https://svnweb.freebsd.org/changeset/base/273020 Log: memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns NULL instead of the "haystack" value (aka big) Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Mon Oct 13 01:14:01 2014 (r273019) +++ head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Mon Oct 13 02:23:24 2014 (r273020) @@ -75,8 +75,13 @@ ATF_TC_HEAD(memmem_basic, tc) ATF_TC_BODY(memmem_basic, tc) { +#if defined(__darwin__) || defined(__FreeBSD__) + expect(memmem(b2, lb2, p0, lp0) == NULL); + expect(memmem(b0, lb0, p0, lp0) == NULL); +#else expect(memmem(b2, lb2, p0, lp0) == b2); expect(memmem(b0, lb0, p0, lp0) == b0); +#endif expect(memmem(b0, lb0, p1, lp1) == NULL); expect(memmem(b1, lb1, p1, lp1) == NULL);