summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2020-08-07 13:51:49 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2020-08-17 14:10:49 -0700
commit3aa2228519bc935e73727e3af2e8fb7809b4aa7f (patch)
treef10f724fce4e6616aa0bf9cc76ff3e5eb054d442 /utils
parentaa0a3561738d207fb4e104598f6d8ed898db5129 (diff)
clean duplicated macro
and add a new new one for range checks. Change-Id: I077fc9d21f1b209c539561d9ebe42df4bf3125a5 CRs-fixed: 2750060
Diffstat (limited to 'utils')
-rw-r--r--utils/gps_extended_c.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h
index f89e55b..fc2df66 100644
--- a/utils/gps_extended_c.h
+++ b/utils/gps_extended_c.h
@@ -486,12 +486,7 @@ typedef uint32_t GnssAdditionalSystemInfoMask;
#define setSvMask(mask, svIdOneBase) \
if (svFitsMask(mask, svIdOneBase)) mask |= (1ULL << ((svIdOneBase) - 1))
-/* Checking svIdOneBase can be set to the corresponding bit in mask */
-#define svFitsMask(mask, svIdOneBase) \
- ((svIdOneBase) >= 1 && (svIdOneBase) <= (sizeof(mask) << 3))
-/* Setting svIdOneBase specific bit in the mask if the bit offset fits */
-#define setSvMask(mask, svIdOneBase) \
- if (svFitsMask(mask, svIdOneBase)) mask |= (1ULL << ((svIdOneBase) - 1))
+#define isValInRangeInclusive(val, min, max) ((val) >= (min) && (val) <= (max))
typedef enum {
LOC_RELIABILITY_NOT_SET = 0,