]> sourceware.org Git - lvm2.git/commitdiff
Avoid changing aligned pe_start as a side-effect of very verbose logging.
authorMike Snitzer <snitzer@redhat.com>
Tue, 3 Aug 2010 18:19:42 +0000 (18:19 +0000)
committerMike Snitzer <snitzer@redhat.com>
Tue, 3 Aug 2010 18:19:42 +0000 (18:19 +0000)
WHATS_NEW
lib/format_text/format-text.c

index 72630ed17d8e96fbc3827f944cb729666a2d1dfb..558162759e0ace49c95a7346e5a886c2673af51d 100644 (file)
--- 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().
index bd776b72c0ca65a073d3c8d6f37a65cc771a0715..c8cf89a132ab53c021a8b6dee1918580e2420bb8 100644 (file)
@@ -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);
                        }
This page took 0.047472 seconds and 5 git commands to generate.