-
Marko Mäkelä authored
InnoDB contains a number of parsing functions that take the start and end pointer to the a buffer, and return the pointer to the next byte in the buffer (or NULL in case the buffer was incomplete). The parsed output is returned in an output parameter. Compilers may issue bogus warnings about the output being uninitialized. It would be more natural programming style to return the parsed output, and update the pointer to the start of the buffer (make it an in,out parameter). mach_read_compressed(): Replace with mach_read_next_compressed(). mach_ull_read_compressed(), mach_ull_get_compressed_size(): Replace with mach_u64_read_next_compressed(). mach_ull_get_much_compressed_size(): Replace with mach_read_next_much_compressed(). mach_u64_read_much_compressed(): Renamed from mach_ull_read_much_compressed(). One caller remains. mach_get_compressed_size(): Replace with mach_read_next_compressed(). mach_parse_compressed(), mach_u64_parse_compressed(): Return the parsed output. Make the first parameter in,out. Various functions: Add const qualifiers to the ptr, end_ptr. On return, cast away the constness for now. We should introduce const qualifiers to everywhere where we are parsing read-only buffers, such as undo log and redo log. rb#4569 approved by Vasil Dimov
Marko Mäkelä authoredInnoDB contains a number of parsing functions that take the start and end pointer to the a buffer, and return the pointer to the next byte in the buffer (or NULL in case the buffer was incomplete). The parsed output is returned in an output parameter. Compilers may issue bogus warnings about the output being uninitialized. It would be more natural programming style to return the parsed output, and update the pointer to the start of the buffer (make it an in,out parameter). mach_read_compressed(): Replace with mach_read_next_compressed(). mach_ull_read_compressed(), mach_ull_get_compressed_size(): Replace with mach_u64_read_next_compressed(). mach_ull_get_much_compressed_size(): Replace with mach_read_next_much_compressed(). mach_u64_read_much_compressed(): Renamed from mach_ull_read_much_compressed(). One caller remains. mach_get_compressed_size(): Replace with mach_read_next_compressed(). mach_parse_compressed(), mach_u64_parse_compressed(): Return the parsed output. Make the first parameter in,out. Various functions: Add const qualifiers to the ptr, end_ptr. On return, cast away the constness for now. We should introduce const qualifiers to everywhere where we are parsing read-only buffers, such as undo log and redo log. rb#4569 approved by Vasil Dimov
Loading