[LIB]: Only check if it is a cacheline boundary when the offset changes
So that we print the boundary after the last member in a bitfield. Spotted by Matthew Wilcox. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
parent
c87d8d831a
commit
27ac8cec6c
12
dwarves.c
12
dwarves.c
|
@ -2521,11 +2521,13 @@ size_t class__fprintf(const struct class *self, const struct cu *cu,
|
|||
struct tag *type;
|
||||
const ssize_t cc_last_size = pos->offset - last_offset;
|
||||
|
||||
printed += class__fprintf_cacheline_boundary(last_cacheline,
|
||||
sum, sum_holes,
|
||||
&newline,
|
||||
&last_cacheline,
|
||||
indent + 1, fp);
|
||||
if (pos->offset != last_offset)
|
||||
printed +=
|
||||
class__fprintf_cacheline_boundary(last_cacheline,
|
||||
sum, sum_holes,
|
||||
&newline,
|
||||
&last_cacheline,
|
||||
indent + 1, fp);
|
||||
if (last_offset != -1) {
|
||||
if (cc_last_size > 0 &&
|
||||
(size_t)cc_last_size < last_size) {
|
||||
|
|
Loading…
Reference in New Issue