From 7d8e94444d989d0ac4a4055b207726708e9ec0da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Jan 2018 08:47:15 +0200 Subject: convert ab?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins Reviewed-by: Noel Grandin --- onlineupdate/source/update/updater/bspatch.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'onlineupdate') diff --git a/onlineupdate/source/update/updater/bspatch.cxx b/onlineupdate/source/update/updater/bspatch.cxx index b39c50f92627..10ec56200511 100644 --- a/onlineupdate/source/update/updater/bspatch.cxx +++ b/onlineupdate/source/update/updater/bspatch.cxx @@ -104,7 +104,7 @@ MBS_ApplyPatch(const MBSPatchHeader *header, FILE* patchFile, unsigned char *wb = buf; while (r) { - const size_t count = (r > SSIZE_MAX) ? SSIZE_MAX : r; + const size_t count = std::min(r, SSIZE_MAX); size_t c = fread(wb, 1, count, patchFile); if (c != count) { -- cgit