]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse: Write 130 as 128 as 0x82 and 0x80.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 16 Oct 2018 16:39:38 +0000 (18:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 17:28:35 +0000 (19:28 +0200)
Write 130 and 128 as 8x82 and 0x80, to avoid warnings about casting from
int to size. "check_req" should probably be unsigned, but it's hard to do so.

src/cfgparse.c

index 4e577aa0b22ff8e60fa51ad11a308f912895fb3a..a262404bb92094518260cbdb3b7f55b42a8781b3 100644 (file)
@@ -5119,7 +5119,7 @@ stats_error_parsing:
                                                                        ((unsigned char) (packetlen >> 16) & 0xff));
 
                                                                curproxy->check_req[3] = 1;
-                                                               curproxy->check_req[5] = 130;
+                                                               curproxy->check_req[5] = 0x82; // 130
                                                                curproxy->check_req[11] = 1;
                                                                curproxy->check_req[12] = 33;
                                                                memcpy(&curproxy->check_req[36], mysqluser, userlen);
@@ -5145,7 +5145,7 @@ stats_error_parsing:
                                                                ((unsigned char) (packetlen >> 16) & 0xff));
 
                                                        curproxy->check_req[3] = 1;
-                                                       curproxy->check_req[5] = 128;
+                                                       curproxy->check_req[5] = 0x80;
                                                        curproxy->check_req[8] = 1;
                                                        memcpy(&curproxy->check_req[9], mysqluser, userlen);
                                                        curproxy->check_req[9 + userlen + 1 + 1]     = 1;