summaryrefslogtreecommitdiffstats
path: root/src/H5SL.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-28 19:33:16 (GMT)
committerGitHub <noreply@github.com>2023-07-28 19:33:16 (GMT)
commit8ddf2706f7e0cde59fad6624e2863960e62f6544 (patch)
treef090bb9fa368c90f67029f5d860ef39df3e8b038 /src/H5SL.c
parentb1ab59d239c74cdbea7d518b1398458c4150655f (diff)
downloadhdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.zip
hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.gz
hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.bz2
Sync of src w/ develop (#3307)
Diffstat (limited to 'src/H5SL.c')
-rw-r--r--src/H5SL.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5SL.c b/src/H5SL.c
index a65a144..d185d6d 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -218,7 +218,7 @@
* head node if necessary. PREV is the previous node of the height that X is to
* grow to. */
#define H5SL_PROMOTE(SLIST, X, PREV, ERR) \
- { \
+ do { \
size_t _lvl = X->level; \
\
H5SL_GROW(X, _lvl, ERR); \
@@ -235,7 +235,7 @@
X->forward[_lvl + 1] = PREV->forward[_lvl + 1]; \
} \
PREV->forward[_lvl + 1] = X; \
- }
+ } while (0)
/* Macro used to reduce the level of a node by 1. Does not update the head node
* "current level". PREV is the previous node of the current height of X. */
@@ -293,7 +293,7 @@
/* Promote the middle node if necessary */ \
if (_count == 3) { \
assert(X == _last->forward[_i]->forward[_i]); \
- H5SL_PROMOTE(SLIST, X, _last, NULL) \
+ H5SL_PROMOTE(SLIST, X, _last, NULL); \
} \
\
/* Prepare to drop down */ \
@@ -398,7 +398,7 @@
/* If there are 2 or more nodes, promote the first */ \
if (_next->forward[_i]->forward[_i] != _llast) { \
X = _next->forward[_i]; \
- H5SL_PROMOTE(SLIST, X, _last, NULL) \
+ H5SL_PROMOTE(SLIST, X, _last, NULL); \
} \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
@@ -424,7 +424,7 @@
\
/* If there are 2 or more nodes, promote the last */ \
if (_count >= 2) \
- H5SL_PROMOTE(SLIST, X, _llast, NULL) \
+ H5SL_PROMOTE(SLIST, X, _llast, NULL); \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
assert(_i == SLIST->curr_level - 1); \