Fix warning on 32-bit ARM: 2 << 31 overflows int

Thanks to GCC 6.1 for finding this.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-09-26 21:40:31 +02:00
parent aeabb4d2ea
commit a6300f6ac6
+1 -1
View File
@@ -197,7 +197,7 @@ void conf_parse_rlimit(char *line)
} else {
const char *err = NULL;
new = strtonum(tok, 0, 2 << 31, &err);
new = strtonum(tok, 0, (long long)2 << 31, &err);
if (err)
goto fail;
}