diff --git a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include/img_mgmt/img_mgmt.h b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include/img_mgmt/img_mgmt.h index 9861199c251..32c73b26a7e 100644 --- a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include/img_mgmt/img_mgmt.h +++ b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include/img_mgmt/img_mgmt.h @@ -41,6 +41,7 @@ extern "C" { #define IMG_MGMT_SWAP_TYPE_TEST 1 #define IMG_MGMT_SWAP_TYPE_PERM 2 #define IMG_MGMT_SWAP_TYPE_REVERT 3 +#define IMG_MGMT_SWAP_TYPE_UNKNOWN 255 /** * Command IDs for image management group. diff --git a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/zephyr_img_mgmt.c b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/zephyr_img_mgmt.c index 80c3c4973c0..3d39a357426 100644 --- a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/zephyr_img_mgmt.c +++ b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/zephyr_img_mgmt.c @@ -511,8 +511,7 @@ img_mgmt_impl_swap_type(int slot) case BOOT_SWAP_TYPE_REVERT: return IMG_MGMT_SWAP_TYPE_REVERT; default: - assert(0); - return IMG_MGMT_SWAP_TYPE_NONE; + return IMG_MGMT_SWAP_TYPE_UNKNOWN; } }