Skip to content
Snippets Groups Projects
Commit 155e7f12 authored by rswindell's avatar rswindell
Browse files

Fix MSVC warnings:

filewrap.c(309): warning C4307: '+' : integral constant overflow
filewrap.c(310): warning C4307: '+' : integral constant overflow
parent 421208e1
Branches
Tags
No related merge requests found
......@@ -306,8 +306,8 @@ static int expandtofit(char **linep, size_t len, size_t *linecapp)
if(len+1 >= LONG_MAX)
return -1;
if(len > *linecapp) {
if(len == LONG_MAX + 1)
newcap = LONG_MAX + 1;
if(len == LONG_MAX)
newcap = LONG_MAX;
else
newcap = p2roundup(len);
newline = (char *)realloc(*linep, newcap);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment