Add const correctness to mysql_util.h

This commit is contained in:
Johan Wikman 2016-12-27 15:51:41 +02:00
parent 25c3c33134
commit c008d794c7
2 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@
MXS_BEGIN_DECLS
/** Length-encoded integers */
size_t leint_bytes(uint8_t* ptr);
uint64_t leint_value(uint8_t* c);
size_t leint_bytes(const uint8_t* ptr);
uint64_t leint_value(const uint8_t* c);
uint64_t leint_consume(uint8_t ** c);
/** Length-encoded strings */

View File

@ -34,7 +34,7 @@
* @param ptr Start of the length encoded value
* @return Number of bytes before the actual value
*/
size_t leint_bytes(uint8_t* ptr)
size_t leint_bytes(const uint8_t* ptr)
{
uint8_t val = *ptr;
if (val < 0xfb)
@ -62,7 +62,7 @@ size_t leint_bytes(uint8_t* ptr)
* @param c Pointer to the first byte of a length-encoded integer
* @return The value converted to a standard unsigned integer
*/
uint64_t leint_value(uint8_t* c)
uint64_t leint_value(const uint8_t* c)
{
uint64_t sz = 0;