From b7c2a2b70949cc079aadf7ec467357deb81f2fec Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Tue, 3 Aug 2010 18:19:42 +0000 Subject: [PATCH] Avoid changing aligned pe_start as a side-effect of very verbose logging. --- WHATS_NEW | 1 + lib/format_text/format-text.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 72630ed17..558162759 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.73 - ================================ + Avoid changing aligned pe_start as a side-effect of very verbose logging. Fix 'void*' arithmetic warnings in dbg_malloc.c. Fix 'void*' arithmetic warning in some functions from libdm-iface.c. Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes(). diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index bd776b72c..c8cf89a13 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -1498,7 +1498,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume adjustment = (pv->pe_start - pv->pe_align_offset) % pv->pe_align; if (adjustment) - pv->pe_start += pv->pe_align - adjustment; + pv->pe_start += (pv->pe_align - adjustment); log_very_verbose("%s: setting pe_start=%" PRIu64 " (orig_pe_start=%" PRIu64 ", " @@ -1506,7 +1506,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume "adjustment=%" PRIu64 ")", pv_dev_name(pv), pv->pe_start, (adjustment ? - pv->pe_start -= pv->pe_align - adjustment : + pv->pe_start - (pv->pe_align - adjustment) : pv->pe_start), pv->pe_align, pv->pe_align_offset, adjustment); } -- 2.43.5