From 10cc2118264db6864eaba872bfccecd421e755fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20D=27Alu?= Date: Mon, 12 Mar 2018 22:58:31 +0100 Subject: [PATCH] service/ans: don't depent on libm for creating bitmask (#903) X-Original-Commit: 0fc4943638290b121b92bc87266860802ee91258 --- nimble/host/services/ans/src/ble_svc_ans.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/nimble/host/services/ans/src/ble_svc_ans.c b/nimble/host/services/ans/src/ble_svc_ans.c index 507d79574..ec58bd58c 100644 --- a/nimble/host/services/ans/src/ble_svc_ans.c +++ b/nimble/host/services/ans/src/ble_svc_ans.c @@ -19,12 +19,6 @@ #include #include -#include - -/* Some ambiq SDK headers use `OVERFLOW` as an identifier. This is a macro - * that is leaked by some versions of math.h. - */ -#undef OVERFLOW #include "sysinit/sysinit.h" #include "syscfg/syscfg.h" @@ -32,7 +26,6 @@ #include "host/ble_gap.h" #include "services/ans/ble_svc_ans.h" - /* Max length of new alert info string */ #define BLE_SVC_ANS_INFO_STR_MAX_LEN 18 /* Max length of a new alert notification, max string length + 2 bytes @@ -349,7 +342,7 @@ ble_svc_ans_unr_alert_add(uint8_t cat_id) uint8_t cat_bit_mask; if (cat_id < BLE_SVC_ANS_CAT_NUM) { - cat_bit_mask = pow(2, cat_id); + cat_bit_mask = 1 << cat_id; } else { return BLE_HS_EINVAL; }