nimble/mesh: Fix build on linux

Use MIN/MAX macros instead of min/max.
This commit is contained in:
Szymon Janc
2022-12-13 00:21:58 +01:00
parent eddc008fa5
commit 2587fbfd8b
8 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ fault_get_cur(struct bt_mesh_model *model,
*test_id = recent_test_id;
*company_id = CID_VENDOR;
*fault_count = min(*fault_count, sizeof(reg_faults));
*fault_count = MIN(*fault_count, sizeof(reg_faults));
memcpy(faults, reg_faults, *fault_count);
return 0;
@@ -78,7 +78,7 @@ fault_get_reg(struct bt_mesh_model *model,
if (has_reg_fault) {
uint8_t reg_faults[FAULT_ARR_SIZE] = { [0 ... FAULT_ARR_SIZE-1] = 0xff };
*fault_count = min(*fault_count, sizeof(reg_faults));
*fault_count = MIN(*fault_count, sizeof(reg_faults));
memcpy(faults, reg_faults, *fault_count);
} else {
*fault_count = 0;