From 191b3936137d1011f2ffb789009d8c37451acee1 Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Thu, 27 Jul 2023 15:32:56 +0200 Subject: [PATCH] Adjust upstream PR 120 to keep output format: spaces around ' * ' Resolves: rhbz2224578 --- 0024-sdr-Fix-segfault-on-invalid-unit-types.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/0024-sdr-Fix-segfault-on-invalid-unit-types.patch b/0024-sdr-Fix-segfault-on-invalid-unit-types.patch index 8e04558..21ad2f3 100644 --- a/0024-sdr-Fix-segfault-on-invalid-unit-types.patch +++ b/0024-sdr-Fix-segfault-on-invalid-unit-types.patch @@ -136,10 +136,10 @@ index eb40b36..b43765a 100644 - static char unitstr[16]; + /* + * Twice as long as the longest possible unit name, plus -+ * two characters for '%' and relation (either '*' or '/'), ++ * four characters for '%' and relation (either ' * ' or '/'), + * plus the terminating null-byte. + */ -+ static char unitstr[2 * UNIT_TYPE_LONGEST_NAME + 2 + 1]; ++ static char unitstr[2 * UNIT_TYPE_LONGEST_NAME + 4 + 1]; + /* * By default, if units are supposed to be percent, we will pre-pend @@ -171,7 +171,7 @@ index eb40b36..b43765a 100644 + + switch (relation) { + case SDR_UNIT_MOD_MUL: -+ snprintf(unitstr, sizeof (unitstr), "%s%s*%s", ++ snprintf(unitstr, sizeof (unitstr), "%s%s * %s", + pctstr, basestr, modstr); break; - case 1: