From dfdd2cfccbf240a19dae7f736ee386a14d107ef2 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 1 Aug 2014 16:49:13 +0300 Subject: [PATCH] Applying changes made in commit fa1f9ec13113e00e65f2425b080cfb0d102b0872 to this branch. --- server/core/modutil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/core/modutil.c b/server/core/modutil.c index 79b9ebad0..f4dc224d9 100644 --- a/server/core/modutil.c +++ b/server/core/modutil.c @@ -68,7 +68,7 @@ unsigned char *ptr; int modutil_extract_SQL(GWBUF *buf, char **sql, int *length) { -char *ptr; +unsigned char *ptr; if (!modutil_is_SQL(buf)) return 0; @@ -78,7 +78,7 @@ char *ptr; *length += (*ptr++ << 8); ptr += 2; // Skip sequence id and COM_QUERY byte *length = *length - 1; - *sql = ptr; + *sql = (char *)ptr; return 1; } @@ -103,7 +103,7 @@ char *ptr; int modutil_MySQL_Query(GWBUF *buf, char **sql, int *length, int *residual) { -char *ptr; +unsigned char *ptr; if (!modutil_is_SQL(buf)) return 0; @@ -115,7 +115,7 @@ char *ptr; *residual = *residual - 1; *length = GWBUF_LENGTH(buf) - 5; *residual -= *length; - *sql = ptr; + *sql = (char *)ptr; return 1; } @@ -133,7 +133,7 @@ char *ptr; GWBUF * modutil_replace_SQL(GWBUF *orig, char *sql) { -char *ptr; +unsigned char *ptr; int length, newlength; GWBUF *addition;