diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-08-24 20:12:24 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:56:09 +0200 |
commit | d2c0a54d9d9075ffcf3812ffc5d93061d2e40694 (patch) | |
tree | c5cf93106e4867a930bf2b67a7fe3a746b5c9943 /4a-hal | |
parent | c9bbd96bd98611870b730a27cdab20c1d661fa71 (diff) |
Correct errors in hal-utilities-data prototypes
Functions can now returns a -int ...
Change-Id: If2732bfc8fdc2566da520fcb104b9a595ac2caa6
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal')
-rw-r--r-- | 4a-hal/4a-hal-utilities/4a-hal-utilities-data.c | 14 | ||||
-rw-r--r-- | 4a-hal/4a-hal-utilities/4a-hal-utilities-data.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c index b7947e1..f3ee028 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c @@ -87,7 +87,7 @@ struct SpecificHalData *HalUtlAddHalApiToHalList(struct SpecificHalData **firstH return currentApi; } -uint8_t HalUtlRemoveSelectedHalFromList(struct SpecificHalData **firstHalData, struct SpecificHalData *apiToRemove) +int8_t HalUtlRemoveSelectedHalFromList(struct SpecificHalData **firstHalData, struct SpecificHalData *apiToRemove) { struct SpecificHalData *currentApi, *matchingApi; @@ -134,15 +134,15 @@ uint8_t HalUtlRemoveSelectedHalFromList(struct SpecificHalData **firstHalData, s return 0; } -uint64_t HalUtlRemoveAllHalFromList(struct SpecificHalData **firstHalData) +int64_t HalUtlRemoveAllHalFromList(struct SpecificHalData **firstHalData) { - uint8_t ret; - uint64_t CtlHalApiRemoved = 0; + int8_t ret; + int64_t CtlHalApiRemoved = 0; while(*firstHalData) { ret = HalUtlRemoveSelectedHalFromList(firstHalData, *firstHalData); if(ret) - return (uint64_t) ret; + return (int64_t) ret; CtlHalApiRemoved++; } @@ -150,9 +150,9 @@ uint64_t HalUtlRemoveAllHalFromList(struct SpecificHalData **firstHalData) return CtlHalApiRemoved; } -uint64_t HalUtlGetNumberOfHalInList(struct SpecificHalData **firstHalData) +int64_t HalUtlGetNumberOfHalInList(struct SpecificHalData **firstHalData) { - uint64_t numberOfCtlHal = 0; + int64_t numberOfCtlHal = 0; struct SpecificHalData *currentApi; if(! firstHalData) diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h index 4eca34d..eb07a5d 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h @@ -94,9 +94,9 @@ struct HalMgrData { // Exported verbs for 'struct SpecificHalData' handling struct SpecificHalData *HalUtlAddHalApiToHalList(struct SpecificHalData **firstHalData); -uint8_t HalUtlRemoveSelectedHalFromList(struct SpecificHalData **firstHalData, struct SpecificHalData *ApiToRemove); -uint64_t HalUtlRemoveAllHalFromList(struct SpecificHalData **firstHalData); -uint64_t HalUtlGetNumberOfHalInList(struct SpecificHalData **firstHalData); +int8_t HalUtlRemoveSelectedHalFromList(struct SpecificHalData **firstHalData, struct SpecificHalData *ApiToRemove); +int64_t HalUtlRemoveAllHalFromList(struct SpecificHalData **firstHalData); +int64_t HalUtlGetNumberOfHalInList(struct SpecificHalData **firstHalData); struct SpecificHalData *HalUtlSearchHalDataByApiName(struct SpecificHalData **firstHalData, char *apiName); struct SpecificHalData *HalUtlSearchReadyHalDataByCarId(struct SpecificHalData **firstHalData, int cardId); |