diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-05-26 10:13:48 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-05-26 10:13:48 +0200 |
commit | af9266d21c787074f9c7b7a715577a79952edccb (patch) | |
tree | 1f51ff08165d8e8326393504aa3cdf49180ef7fd /tools.c | |
parent | 09386e621d50d9f4f3e894afc888aa980b5fafac (diff) | |
download | vdr-af9266d21c787074f9c7b7a715577a79952edccb.tar.gz vdr-af9266d21c787074f9c7b7a715577a79952edccb.tar.bz2 |
Fixed calculating the cache size in cUnbufferedFile::Read()
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.117 2006/04/21 15:12:47 kls Exp $ + * $Id: tools.c 1.118 2006/05/26 10:10:31 kls Exp $ */ #include "tools.h" @@ -1179,7 +1179,7 @@ ssize_t cUnbufferedFile::Read(void *Data, size_t Size) } else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) { // current position has moved back enough, shrink head window. - FadviseDrop(curpos + READCHUNK, cachedend - curpos + READCHUNK); + FadviseDrop(curpos + READCHUNK, cachedend - (curpos + READCHUNK)); cachedend = curpos + READCHUNK; } } |