util/disk_cache: fix size subtraction on 32bit
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 9 Mar 2017 00:54:53 +0000 (02:54 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 9 Mar 2017 09:26:30 +0000 (20:26 +1100)
commit61bbb25a080e48a8ca897ba7f6e73cc6a8e9b5b8
tree84bfcb48159cc4d685e9f859f03415c0b17c4da4
parent926bcacfd3f9025007455c026d44f810018cf787
util/disk_cache: fix size subtraction on 32bit

Negating size_t on 32bit produces a 32bit result. This was effectively
adding values close to UINT_MAX to the cache size (the files are usually
small) instead of intended subtraction.
Fixes 'make check' disk_cache failures on 32bit.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/util/disk_cache.c