summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/my_global.h6
-rw-r--r--storage/maria/ma_loghandler.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/my_global.h b/include/my_global.h
index e08719fd988..5590570df94 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -972,11 +972,11 @@ typedef unsigned long long my_ulonglong;
#endif
#if SIZEOF_CHARP == SIZEOF_INT
-typedef int intptr;
+typedef unsigned int intptr;
#elif SIZEOF_CHARP == SIZEOF_LONG
-typedef long intptr;
+typedef unsigned long intptr;
#elif SIZEOF_CHARP == SIZEOF_LONG_LONG
-typedef long long intptr;
+typedef unsigned long long intptr;
#else
#error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long)
#endif
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index 7ca9c46a998..2caf8d84a71 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -9038,7 +9038,7 @@ static uchar *dump_chunk(uchar *buffer, uchar *ptr)
}
{
intptr offset= ptr - buffer;
- DBUG_ASSERT(offset >= 0 && offset <= UINT_MAX16);
+ DBUG_ASSERT(offset <= UINT_MAX16);
length= translog_get_total_chunk_length(buffer, (uint16)offset);
}
printf(" Length %u\n", length);