diff options
author | plougher <plougher> | 2009-01-31 07:32:57 +0000 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-02-23 12:34:12 -0800 |
commit | 01feb21e74963aa0cb49c7bd4bb638cb08df2a7c (patch) | |
tree | 6eafa4f6933195a89aa3e77b628f8eac9f8c3b59 /kernel/fs/squashfs/file.c | |
parent | dd2dee4f02c52cb10cde44cc1d44a2df28800294 (diff) | |
download | squashfs-tools-01feb21e74963aa0cb49c7bd4bb638cb08df2a7c.tar.gz |
Simplify a couple of lines of code
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Diffstat (limited to 'kernel/fs/squashfs/file.c')
-rw-r--r-- | kernel/fs/squashfs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/fs/squashfs/file.c b/kernel/fs/squashfs/file.c index 9fb181c..6d93625 100644 --- a/kernel/fs/squashfs/file.c +++ b/kernel/fs/squashfs/file.c @@ -223,7 +223,7 @@ failure: */ static inline int calculate_skip(int blocks) { - int skip = (blocks - 1) / ((SQUASHFS_META_ENTRIES + 1) + int skip = blocks / ((SQUASHFS_META_ENTRIES + 1) * SQUASHFS_META_INDEXES); return min(SQUASHFS_CACHED_BLKS - 1, skip + 1); } @@ -452,8 +452,7 @@ static int squashfs_readpage(struct file *file, struct page *page) for (i = start_index; i <= end_index && bytes > 0; i++, bytes -= PAGE_CACHE_SIZE, offset += PAGE_CACHE_SIZE) { struct page *push_page; - int avail = sparse ? 0 : min_t(unsigned int, bytes, - PAGE_CACHE_SIZE); + int avail = sparse ? 0 : min_t(int, bytes, PAGE_CACHE_SIZE); TRACE("bytes %d, i %d, available_bytes %d\n", bytes, i, avail); |