summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-12 13:08:17 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-12 13:08:17 +0300
commit4387e3a13bba61313a1637f63253e01e6edbce0c (patch)
treee3ebddf5740e5930d3c47a19838037cb0be34f88
parent5a4ae142f48bcf9e11becfd4c98d72de338bba6a (diff)
downloadmariadb-git-4387e3a13bba61313a1637f63253e01e6edbce0c.tar.gz
Use DBUG_ASSERT(ptr != NULL) to ease merging to 10.3
In 10.3, DBUG_ASSERT() may expand to something that includes __builtin_expect(), which expects integer arguments, not pointers. To avoid any compiler warnings, let us use an explicit rather than implicit comparison to the null pointer.
-rw-r--r--include/ilist.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ilist.h b/include/ilist.h
index dc75d6907ce..ed1d978a0d6 100644
--- a/include/ilist.h
+++ b/include/ilist.h
@@ -71,12 +71,12 @@ public:
typedef T *pointer;
typedef T &reference;
- Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_); }
+ Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_ != NULL); }
Iterator &operator++()
{
node_= node_->next;
- DBUG_ASSERT(node_);
+ DBUG_ASSERT(node_ != NULL);
return *this;
}
Iterator operator++(int)