diff --git a/storage/maria/ma_delete.c b/storage/maria/ma_delete.c
index 7921ab59a8f..5d66015b9ac 100644
--- a/storage/maria/ma_delete.c
+++ b/storage/maria/ma_delete.c
@@ -695,9 +695,7 @@ static int del(MARIA_HA *info, MARIA_KEY *key,
   key_start= keypos;
   if (tmp_key.flag & (SEARCH_USER_KEY_HAS_TRANSID |
                       SEARCH_PAGE_KEY_HAS_TRANSID))
-  {
     _ma_mark_page_with_transid(share, anc_page);
-  }
 
   /* Save pointer to next leaf on parent page */
   if (!(*keyinfo->get_key)(&ret_key, page_flag, share->base.key_reflength,
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index 52954aded4f..fde0b3a7afd 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -843,9 +843,8 @@ int _ma_insert(register MARIA_HA *info, MARIA_KEY *key,
   a_length+=t_length;
 
   if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
-  {
     _ma_mark_page_with_transid(share, anc_page);
-  }
+
   anc_page->size= a_length;
   page_store_size(share, anc_page);
 
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 128e78da32b..eeb5625cb7e 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -777,8 +777,8 @@ struct st_maria_handler
   transid_korr((buff) + LSN_STORE_SIZE)
 #define _ma_store_keypage_flag(share,x,flag) x[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (flag)
 #define _ma_mark_page_with_transid(share, page) \
-  (page)->flag|= KEYPAGE_FLAG_HAS_TRANSID;                              \
-  (page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag;
+  do { (page)->flag|= KEYPAGE_FLAG_HAS_TRANSID;                        \
+    (page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag; } while (0)
 
 #define KEYPAGE_KEY_VERSION(share, x) ((x) + \
                                        (share)->keypage_header -        \