X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tools%2Ftrasher.c;h=aaa09f4ca88c710483408f340a0558e475af4772;hb=507f2940ccdcedf2fdc064c5fb6022b60bace8ca;hp=93bfc0c3e4665656188121d5589e153152bd4de2;hpb=ce27c9eb25986ffb79fa77ad978c7ed676f02aac;p=ffmpeg diff --git a/tools/trasher.c b/tools/trasher.c index 93bfc0c3e46..aaa09f4ca88 100644 --- a/tools/trasher.c +++ b/tools/trasher.c @@ -56,7 +56,10 @@ int main(int argc, char **argv) while (count--) { int burst = 1 + ran() * (uint64_t) (abs(maxburst) - 1) / UINT32_MAX; int pos = ran() * (uint64_t) length / UINT32_MAX; - fseek(f, pos, SEEK_SET); + if (fseek(f, pos, SEEK_SET) < 0) { + fprintf(stderr, "seek failed\n"); + return 1; + } if (maxburst < 0) burst = -maxburst;