You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. commit 0d31b8e1dae2bd0ad73c90748a03f9cfeed837d8
  2. Author: Olivier Houchard <ohouchard@haproxy.com>
  3. Date: Tue Oct 16 18:49:26 2018 +0200
  4. MINOR: peers: use defines instead of enums to appease clang.
  5. Clang (rightfully) warns that we're trying to set chars to values >= 128.
  6. Use defines with hex values instead of an enum to address this.
  7. (cherry picked from commit 33992267aac00d7e8ae67e0703bf7fffc9cf9b54)
  8. Signed-off-by: Willy Tarreau <w@1wt.eu>
  9. diff --git a/src/peers.c b/src/peers.c
  10. index 0cd56da3..465ffe85 100644
  11. --- a/src/peers.c
  12. +++ b/src/peers.c
  13. @@ -122,15 +122,13 @@ enum {
  14. /* Note: ids >= 128 contains */
  15. /* id message cotains data */
  16. /*******************************/
  17. -enum {
  18. - PEER_MSG_STKT_UPDATE = 128,
  19. - PEER_MSG_STKT_INCUPDATE,
  20. - PEER_MSG_STKT_DEFINE,
  21. - PEER_MSG_STKT_SWITCH,
  22. - PEER_MSG_STKT_ACK,
  23. - PEER_MSG_STKT_UPDATE_TIMED,
  24. - PEER_MSG_STKT_INCUPDATE_TIMED,
  25. -};
  26. +#define PEER_MSG_STKT_UPDATE 0x80
  27. +#define PEER_MSG_STKT_INCUPDATE 0x81
  28. +#define PEER_MSG_STKT_DEFINE 0x82
  29. +#define PEER_MSG_STKT_SWITCH 0x83
  30. +#define PEER_MSG_STKT_ACK 0x84
  31. +#define PEER_MSG_STKT_UPDATE_TIMED 0x85
  32. +#define PEER_MSG_STKT_INCUPDATE_TIMED 0x86
  33. /**********************************/
  34. /* Peer Session IO handler states */