Align function signature of HMX_NVRAM_GetLength
Align function signature of HMX_NVRAM_GetLength with
drv_NVRAM_GetLength. Previously, we got this error message:
hmx_upgrade_nvram.c: In function 'HMX_NVRAM_GetLength':
hmx_upgrade_nvram.c:961:3: error: pointer targets in passing argument 3 of 'drv_NVRAM_GetLength' differ in signedness
hmx_upgrade_nvram.c:432:18: note: expected 'unsigned int *' but argument is of type 'int *'
Change-Id: Ie778779f38509fef1b6736aaaf85b33a55824fc3
diff --git a/libupgrade/hmx_upgrade_nvram.c b/libupgrade/hmx_upgrade_nvram.c
index 2c07b7a..c3434d6 100644
--- a/libupgrade/hmx_upgrade_nvram.c
+++ b/libupgrade/hmx_upgrade_nvram.c
@@ -869,7 +869,7 @@
return DRV_ERR_OUTOFMEMORY;
}
- int fieldLen = 0;
+ unsigned int fieldLen = 0;
// Need to use fieldLen for actual field length because pLen is always
// <= nDataSize. If input data size is shorter this may falsely skip hnvram
// writing.
@@ -938,7 +938,7 @@
return errCode;
}
-DRV_Error HMX_NVRAM_GetLength(NVRAM_FIELD_T field, int *pLen)
+DRV_Error HMX_NVRAM_GetLength(NVRAM_FIELD_T field, unsigned int *pLen)
{
DRV_Error errCode = DRV_ERR;
unsigned char szFileName[MAX_NVRAM_FILENAME_LENGTH];
diff --git a/libupgrade/hmx_upgrade_nvram.h b/libupgrade/hmx_upgrade_nvram.h
index 3e638fe..8ae6f02 100644
--- a/libupgrade/hmx_upgrade_nvram.h
+++ b/libupgrade/hmx_upgrade_nvram.h
@@ -158,7 +158,7 @@
void *data, int nDataSize);
DRV_Error HMX_NVRAM_SetField(NVRAM_FIELD_T field, unsigned int offset,
void *data, int nDataSize);
-DRV_Error HMX_NVRAM_GetLength(NVRAM_FIELD_T field, int *pLen);
+DRV_Error HMX_NVRAM_GetLength(NVRAM_FIELD_T field, unsigned int *pLen);
DRV_Error HMX_NVRAM_Remove(HMX_NVRAM_PARTITION_E partition,
unsigned char *pName);
DRV_Error HMX_NVRAM_Dir(void);