From 41b4e6e69e71bdbb9550b51918bedc0c8152e53d Mon Sep 17 00:00:00 2001 From: Frank Voorburg Date: Thu, 6 Jun 2019 09:12:22 +0000 Subject: [PATCH] Refs #820. Refactored return value check for NvmWrite and NvmErase. git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@687 5dc33758-31d5-4daf-9ae8-b24bf3d40d73 --- Target/Source/xcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Target/Source/xcp.c b/Target/Source/xcp.c index cbaa1c09..4192db47 100644 --- a/Target/Source/xcp.c +++ b/Target/Source/xcp.c @@ -1259,7 +1259,7 @@ static void XcpCmdProgramMax(blt_int8u *data) #endif /* program the data */ - if (NvmWrite((blt_addr)xcpInfo.mta, XCP_CTO_PACKET_LEN-1, &data[1]) == 0) + if (NvmWrite((blt_addr)xcpInfo.mta, XCP_CTO_PACKET_LEN-1, &data[1]) == BLT_FALSE) { /* error occurred during programming */ XcpSetCtoError(XCP_ERR_GENERIC); @@ -1322,7 +1322,7 @@ static void XcpCmdProgram(blt_int8u *data) return; } /* program the data */ - if (NvmWrite((blt_addr)xcpInfo.mta, data[1], &data[2]) == 0) + if (NvmWrite((blt_addr)xcpInfo.mta, data[1], &data[2]) == BLT_FALSE) { /* error occurred during programming */ XcpSetCtoError(XCP_ERR_GENERIC); @@ -1354,7 +1354,7 @@ static void XcpCmdProgramClear(blt_int8u *data) #endif /* erase the memory */ - if (NvmErase((blt_addr)xcpInfo.mta, *(blt_int32u *)&data[4]) == 0) + if (NvmErase((blt_addr)xcpInfo.mta, *(blt_int32u *)&data[4]) == BLT_FALSE) { /* error occurred during erasure */ XcpSetCtoError(XCP_ERR_GENERIC);