summaryrefslogtreecommitdiff
path: root/storage/innobase/include/rem0rec.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 09:41:44 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 09:41:44 +0300
commit1813d92d0c505a1c752f4a9d6e37db6bffe4efdd (patch)
treef570314890197949ae55cbbad3a94eb5893c4177 /storage/innobase/include/rem0rec.h
parent0fe97c20b341665058491fca4d665207406775c6 (diff)
parentf347b3e0e6592329b1447fa460aca0a4b1f680b1 (diff)
downloadmariadb-git-1813d92d0c505a1c752f4a9d6e37db6bffe4efdd.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/innobase/include/rem0rec.h')
-rw-r--r--storage/innobase/include/rem0rec.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 197375b6301..c51e831fb0e 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -601,19 +601,17 @@ rec_offs_make_nth_extern(
rec_offs* offsets,
const ulint n);
+MY_ATTRIBUTE((nonnull))
/** Determine the number of allocated elements for an array of offsets.
@param[in] offsets offsets after rec_offs_set_n_alloc()
@return number of elements */
-inline
-ulint
-rec_offs_get_n_alloc(const rec_offs* offsets)
+inline ulint rec_offs_get_n_alloc(const rec_offs *offsets)
{
- ulint n_alloc;
- ut_ad(offsets);
- n_alloc = offsets[0];
- ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
- UNIV_MEM_ASSERT_W(offsets, n_alloc * sizeof *offsets);
- return(n_alloc);
+ ut_ad(offsets);
+ ulint n_alloc= offsets[0];
+ ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
+ MEM_CHECK_ADDRESSABLE(offsets, n_alloc * sizeof *offsets);
+ return n_alloc;
}
/** Determine the number of fields for which offsets have been initialized.