svn commit: r307951 - in head: . sys/boot/efi/libefi
Warner Losh
imp at FreeBSD.org
Tue Oct 25 19:04:45 UTC 2016
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';
More information about the svn-src-all
mailing list