summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/histfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/histfile.c')
-rw-r--r--cmd-line-utils/readline/histfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-line-utils/readline/histfile.c b/cmd-line-utils/readline/histfile.c
index 7d340b346d4..a7d6a68098e 100644
--- a/cmd-line-utils/readline/histfile.c
+++ b/cmd-line-utils/readline/histfile.c
@@ -184,7 +184,8 @@ read_history_range (filename, from, to)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
errno = overflow_errno;
goto error_and_exit;