Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
973c59be
Commit
973c59be
authored
May 19, 2010
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make UNIV_DEBUG Valgrind friendly. Use | instead of +,
and mask out the dont-care bits in debug assertions.
parent
02a60e86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
storage/innodb_plugin/include/mach0data.ic
storage/innodb_plugin/include/mach0data.ic
+10
-13
No files found.
storage/innodb_plugin/include/mach0data.ic
View file @
973c59be
...
...
@@ -36,7 +36,7 @@ mach_write_to_1(
ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */
{
ut_ad(b);
ut_ad(
n
<= 0xFFUL);
ut_ad(
(n | 0xFFUL)
<= 0xFFUL);
b[0] = (byte)n;
}
...
...
@@ -65,7 +65,7 @@ mach_write_to_2(
ulint n) /*!< in: ulint integer to be stored */
{
ut_ad(b);
ut_ad(
n
<= 0xFFFFUL);
ut_ad(
(n | 0xFFFFUL)
<= 0xFFFFUL);
b[0] = (byte)(n >> 8);
b[1] = (byte)(n);
...
...
@@ -81,10 +81,7 @@ mach_read_from_2(
/*=============*/
const byte* b) /*!< in: pointer to 2 bytes */
{
ut_ad(b);
return( ((ulint)(b[0]) << 8)
+ (ulint)(b[1])
);
return(((ulint)(b[0]) << 8) | (ulint)(b[1]));
}
/********************************************************//**
...
...
@@ -129,7 +126,7 @@ mach_write_to_3(
ulint n) /*!< in: ulint integer to be stored */
{
ut_ad(b);
ut_ad(
n
<= 0xFFFFFFUL);
ut_ad(
(n | 0xFFFFFFUL)
<= 0xFFFFFFUL);
b[0] = (byte)(n >> 16);
b[1] = (byte)(n >> 8);
...
...
@@ -148,8 +145,8 @@ mach_read_from_3(
{
ut_ad(b);
return( ((ulint)(b[0]) << 16)
+
((ulint)(b[1]) << 8)
+
(ulint)(b[2])
|
((ulint)(b[1]) << 8)
|
(ulint)(b[2])
);
}
...
...
@@ -183,9 +180,9 @@ mach_read_from_4(
{
ut_ad(b);
return( ((ulint)(b[0]) << 24)
+
((ulint)(b[1]) << 16)
+
((ulint)(b[2]) << 8)
+
(ulint)(b[3])
|
((ulint)(b[1]) << 16)
|
((ulint)(b[2]) << 8)
|
(ulint)(b[3])
);
}
...
...
@@ -721,7 +718,7 @@ mach_read_from_2_little_endian(
/*===========================*/
const byte* buf) /*!< in: from where to read */
{
return((ulint)(
*buf) + ((ulint)(*(buf + 1))) * 256
);
return((ulint)(
buf[0]) | ((ulint)(buf[1]) << 8)
);
}
/*********************************************************//**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment