X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=thirdparty%2Fsnappy%2Fsnappy-test.h;fp=thirdparty%2Fsnappy%2Fsnappy-test.h;h=ef6a95539d1e454091f5a9be82f2d84b62073a79;hb=af0f4f9483fc9aef4d3af914d80d56b560272dcb;hp=649f26e7ac1fd2608aeb23f93bf7ab8101525829;hpb=df1a1816c13e6fcdf63a45c973f09f04af318073;p=apitrace diff --git a/thirdparty/snappy/snappy-test.h b/thirdparty/snappy/snappy-test.h index 649f26e..ef6a955 100644 --- a/thirdparty/snappy/snappy-test.h +++ b/thirdparty/snappy/snappy-test.h @@ -135,7 +135,7 @@ namespace File { while (!feof(fp)) { char buf[4096]; size_t ret = fread(buf, 1, 4096, fp); - if (ret == -1) { + if (ret == 0 && ferror(fp)) { perror("fread"); exit(1); }