Commit ee61dfe0 authored by Max Kellermann's avatar Max Kellermann

protocol/ArgParser: use std::numeric_limits

Using unsigned(-1) renders undefined behavior.
parent 9231f420
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include "Result.hxx" #include "Result.hxx"
#include "Chrono.hxx" #include "Chrono.hxx"
#include <limits>
#include <stdlib.h> #include <stdlib.h>
bool bool
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "check.h" #include "check.h"
#include <limits>
#include <stdint.h> #include <stdint.h>
class Client; class Client;
...@@ -39,7 +41,7 @@ struct RangeArg { ...@@ -39,7 +41,7 @@ struct RangeArg {
void SetAll() { void SetAll() {
start = 0; start = 0;
end = unsigned(-1); end = std::numeric_limits<unsigned>::max();
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment