From d50146a0cb6b3fed4dc6afdf60384af1d1237469 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 9 May 2019 11:10:00 +1000 Subject: [PATCH] Correct width calculation in logger.cc From @chriscalender in https://github.com/MariaDB/server/pull/1169 --- ft/logger/logger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ft/logger/logger.cc b/ft/logger/logger.cc index 3f13fe10f..32b8880ad 100644 --- a/ft/logger/logger.cc +++ b/ft/logger/logger.cc @@ -671,7 +671,7 @@ int toku_logger_find_logfiles (const char *directory, char ***resultp, int *n_lo // which are one character longer than old log file names ("xxx.tokulog2"). The comparison function // won't look beyond the terminating NUL, so an extra character in the comparison string doesn't matter. // Allow room for terminating NUL after "xxx.tokulog13" even if result[0] is of form "xxx.tokulog2." - int width = sizeof(result[0]+2); + int width = sizeof(result[0]) + 2; qsort(result, n_results, width, logfilenamecompare); *resultp = result; *n_logfiles = n_results;