From ee61dfe08742b76b1c637a038dd5b3a6b244ece7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Aug 2015 22:57:47 +0200 Subject: protocol/ArgParser: use std::numeric_limits Using unsigned(-1) renders undefined behavior. --- src/protocol/ArgParser.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/protocol/ArgParser.hxx') diff --git a/src/protocol/ArgParser.hxx b/src/protocol/ArgParser.hxx index d71894771..221ffebe3 100644 --- a/src/protocol/ArgParser.hxx +++ b/src/protocol/ArgParser.hxx @@ -22,6 +22,8 @@ #include "check.h" +#include + #include class Client; @@ -39,7 +41,7 @@ struct RangeArg { void SetAll() { start = 0; - end = unsigned(-1); + end = std::numeric_limits::max(); } }; -- cgit v1.2.3