mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-12 08:49:29 +00:00
BUILD: http_act: cast file sizes when reporting file size error
As seen in issue #496, st_size may be of varying types on different systems. Let's simply cast it to long long and use long long for all size outputs.
This commit is contained in:
parent
160ad9e38a
commit
e35d1d4f42
@ -2134,8 +2134,8 @@ static enum act_parse_ret parse_http_return(const char **args, int *orig_arg, st
|
||||
goto error;
|
||||
}
|
||||
if (stat.st_size > global.tune.bufsize) {
|
||||
memprintf(err, "file '%s' exceeds the buffer size (%ld > %d)",
|
||||
args[cur_arg], stat.st_size, global.tune.bufsize);
|
||||
memprintf(err, "file '%s' exceeds the buffer size (%lld > %d)",
|
||||
args[cur_arg], (long long)stat.st_size, global.tune.bufsize);
|
||||
goto error;
|
||||
}
|
||||
objlen = stat.st_size;
|
||||
@ -2183,8 +2183,8 @@ static enum act_parse_ret parse_http_return(const char **args, int *orig_arg, st
|
||||
goto error;
|
||||
}
|
||||
if (stat.st_size > global.tune.bufsize) {
|
||||
memprintf(err, "file '%s' exceeds the buffer size (%ld > %d)",
|
||||
args[cur_arg], stat.st_size, global.tune.bufsize);
|
||||
memprintf(err, "file '%s' exceeds the buffer size (%lld > %d)",
|
||||
args[cur_arg], (long long)stat.st_size, global.tune.bufsize);
|
||||
goto error;
|
||||
}
|
||||
objlen = stat.st_size;
|
||||
|
Loading…
Reference in New Issue
Block a user