Use better naming for flags
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index dbf2c1e..56f7ab9 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -788,7 +788,7 @@
     rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_1, &swap_state);
     assert(rc == 0);
 
-    if (swap_state.image_ok == BOOT_IMAGE_OK) {
+    if (swap_state.image_ok == BOOT_FLAG_SET) {
         rc = boot_write_image_ok(fap);
         assert(rc == 0);
     }
@@ -947,7 +947,7 @@
                                             &swap_state);
             assert(rc == 0);
 
-            if (swap_state.image_ok == BOOT_IMAGE_OK) {
+            if (swap_state.image_ok == BOOT_FLAG_SET) {
                 rc = boot_write_image_ok(fap);
                 assert(rc == 0);
             }
@@ -1138,14 +1138,14 @@
         }
     }
 
-    if (state_slot0.copy_done == 0xff) {
+    if (state_slot0.copy_done == BOOT_FLAG_UNSET) {
         rc = boot_write_copy_done(fap);
         if (rc != 0) {
             return rc;
         }
     }
 
-    if (state_slot0.image_ok == BOOT_IMAGE_UNSET) {
+    if (state_slot0.image_ok == BOOT_FLAG_UNSET) {
         rc = boot_write_image_ok(fap);
         if (rc != 0) {
             return rc;