* mandoc: simplify a few accesses to fields of structs, using auxiliary
@ 2021-10-17 21:06 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2021-10-17 21:06 UTC (permalink / raw)
To: source
Log Message:
-----------
simplify a few accesses to fields of structs, using auxiliary pointer
variables that are already present (and used nearby) in the code;
no functional change
Modified Files:
--------------
mandoc:
out.c
Revision Data
-------------
Index: out.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/out.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -Lout.c -Lout.c -u -p -r1.84 -r1.85
--- out.c
+++ out.c
@@ -247,13 +247,13 @@ tblcalc(struct rofftbl *tbl, const struc
done = 1;
break;
} else
- (*gp)->wanted -= width;
+ g->wanted -= width;
}
if (done) {
*gp = g->next;
free(g);
} else
- gp = &(*gp)->next;
+ gp = &g->next;
}
colwidth = mandoc_reallocarray(NULL, maxcol + 1, sizeof(*colwidth));
@@ -326,7 +326,7 @@ tblcalc(struct rofftbl *tbl, const struc
*gp = g->next;
free(g);
} else
- gp = &(*gp)->next;
+ gp = &g->next;
}
}
free(colwidth);
@@ -553,7 +553,5 @@ tblcalc_number(struct rofftbl *tbl, stru
col->nwidth = totsz;
if (col->nwidth > col->width)
col->width = col->nwidth;
- fprintf(stderr, "N=%zu D=%zu I=%zu T=%zu %s\n",
- col->nwidth, col->decimal, intsz, totsz, dp->string);
return totsz;
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-17 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 21:06 mandoc: simplify a few accesses to fields of structs, using auxiliary schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).