Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit202f2ad

Browse files
committed
find_zero_tail: fix last bytes check
1 parentb568f22 commit202f2ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/utils/file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,9 +2649,9 @@ find_zero_tail(char *buf, size_t len)
26492649
return0;
26502650

26512651
/* fast check for last bytes */
2652-
i= (len-1)& ~(PAGE_ZEROSEARCH_FINE_GRANULARITY-1);
2653-
l=len-i;
2654-
if (memcmp(buf+i,zerobuf,i)!=0)
2652+
l=Min(len,PAGE_ZEROSEARCH_FINE_GRANULARITY);
2653+
i=len-l;
2654+
if (memcmp(buf+i,zerobuf,l)!=0)
26552655
returnlen;
26562656

26572657
/* coarse search for zero tail */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp