From: Willy Tarreau Date: Thu, 14 Jan 2010 10:41:31 +0000 (+0100) Subject: [BUG] checks: chars are unsigned on AIX, check was always true X-Git-Tag: v1.4-dev7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a3a51752b67f92fc4a97119990038358963d5d8;p=thirdparty%2Fhaproxy.git [BUG] checks: chars are unsigned on AIX, check was always true Use '\xff' instead of -1 for a character test. --- diff --git a/src/checks.c b/src/checks.c index 61349fef76..79009612ee 100644 --- a/src/checks.c +++ b/src/checks.c @@ -866,7 +866,7 @@ static int event_srv_chk_r(int fd) else if (s->proxy->options2 & PR_O2_MYSQL_CHK) { /* MySQL Error packet always begin with field_count = 0xff * contrary to OK Packet who always begin whith 0x00 */ - if (trash[4] != -1) { + if (trash[4] != '\xff') { /* We set the MySQL Version in description for information purpose * FIXME : it can be cool to use MySQL Version for other purpose, * like mark as down old MySQL server.