protocol/ArgParser: use std::numeric_limits

Using unsigned(-1) renders undefined behavior.
This commit is contained in:
Max Kellermann
2015-08-11 22:57:47 +02:00
parent 9231f420c1
commit ee61dfe087
2 changed files with 3 additions and 3 deletions

View File

@@ -22,6 +22,8 @@
#include "check.h"
#include <limits>
#include <stdint.h>
class Client;
@@ -39,7 +41,7 @@ struct RangeArg {
void SetAll() {
start = 0;
end = unsigned(-1);
end = std::numeric_limits<unsigned>::max();
}
};