From owner-svn-src-all@freebsd.org Tue Oct 25 19:04:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D912C2235F; Tue, 25 Oct 2016 19:04:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5A39B8D8; Tue, 25 Oct 2016 19:04:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PJ4iXr019206; Tue, 25 Oct 2016 19:04:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PJ4iHs019205; Tue, 25 Oct 2016 19:04:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201610251904.u9PJ4iHs019205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 25 Oct 2016 19:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307951 - in head: . sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 19:04:45 -0000 Author: imp Date: Tue Oct 25 19:04:44 2016 New Revision: 307951 URL: https://svnweb.freebsd.org/changeset/base/307951 Log: Fix two backwards tests. CID: 1365227, 1365228 Deleted: head/Makefile.ficl Modified: head/sys/boot/efi/libefi/env.c Modified: head/sys/boot/efi/libefi/env.c ============================================================================== --- head/sys/boot/efi/libefi/env.c Tue Oct 25 19:04:42 2016 (r307950) +++ head/sys/boot/efi/libefi/env.c Tue Oct 25 19:04:44 2016 (r307951) @@ -114,7 +114,7 @@ ficlEfiSetenv(FICL_VM *pVM) #ifndef TESTMAIN guid = (char*)ficlMalloc(guids); - if (guid != NULL) + if (guid == NULL) vmThrowErr(pVM, "Error: out of memory"); memcpy(guid, guidp, guids); uuid_from_string(guid, &u, &ustatus); @@ -131,7 +131,7 @@ ficlEfiSetenv(FICL_VM *pVM) name[names] = (CHAR16)0; value = (char*)ficlMalloc(values + 1); - if (value != NULL) + if (value == NULL) vmThrowErr(pVM, "Error: out of memory"); memcpy(value, valuep, values); @@ -166,7 +166,7 @@ ficlEfiGetenv(FICL_VM *pVM) #ifndef TESTMAIN name = (char*) ficlMalloc(names+1); - if (!name) + if (name == NULL) vmThrowErr(pVM, "Error: out of memory"); strncpy(name, namep, names); name[names] = '\0'; @@ -201,7 +201,7 @@ ficlEfiUnsetenv(FICL_VM *pVM) #ifndef TESTMAIN name = (char*) ficlMalloc(names+1); - if (!name) + if (name == NULL) vmThrowErr(pVM, "Error: out of memory"); strncpy(name, namep, names); name[names] = '\0';