Date: Tue, 25 Oct 2016 19:04:44 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> 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 Message-ID: <201610251904.u9PJ4iHs019205@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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';
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610251904.u9PJ4iHs019205>