Fixed compilation of tier1 caused by min/max.

This commit is contained in:
Ted Wang authored and David Anderson committed 2021-08-26 22:20:51 -07:00
1 parent c33f7155e9
commit eea4d13b82
6 files changed
+19 -19

No files matched your search

+5 -5
View File
@@ -219,8 +219,8 @@ int FindDiffsForLargeFiles(uint8 const *NewBlock, uint8 const *OldBlock,
int match_of=b->dataptr-lastmatchend;
if ((match_of>-32768) && (match_of<32767))
{
int max_mlength=min(65535,OldBlock+OldSize-b->dataptr);
max_mlength=min(max_mlength,NewBlock+NewSize-walk);
int max_mlength=V_min(65535,OldBlock+OldSize-b->dataptr);
max_mlength=V_min(max_mlength,NewBlock+NewSize-walk);
int i;
for(i=0;i<max_mlength;i++)
if (walk[i]!=b->dataptr[i])
@@ -355,8 +355,8 @@ int FindDiffs(uint8 const *NewBlock, uint8 const *OldBlock,
int match_of=b->dataptr-lastmatchend;
if ((match_of>-32768) && (match_of<32767))
{
int max_mlength=min(65535,OldBlock+OldSize-b->dataptr);
max_mlength=min(max_mlength,NewBlock+NewSize-walk);
int max_mlength=V_min(65535,OldBlock+OldSize-b->dataptr);
max_mlength=V_min(max_mlength,NewBlock+NewSize-walk);
int i;
for(i=0;i<max_mlength;i++)
if (walk[i]!=b->dataptr[i])
@@ -467,7 +467,7 @@ int FindDiffsLowMemory(uint8 const *NewBlock, uint8 const *OldBlock,
uint16 hash1=(walk[0]+walk[1]+walk[2]+walk[3]) & (NELEMS(old_data_hash)-1);
if (old_data_hash[hash1])
{
int max_bytes_to_compare=min(NewBlock+NewSize-walk,OldBlock+OldSize-old_data_hash[hash1]);
int max_bytes_to_compare=V_min(NewBlock+NewSize-walk,OldBlock+OldSize-old_data_hash[hash1]);
int nmatches;
for(nmatches=0;nmatches<max_bytes_to_compare;nmatches++)
if (walk[nmatches]!=old_data_hash[hash1][nmatches])