From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19677 invoked from network); 17 Oct 2021 21:06:26 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2021 21:06:26 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id e6636db6 for ; Sun, 17 Oct 2021 16:06:25 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 54f403cf for ; Sun, 17 Oct 2021 16:06:25 -0500 (EST) Date: Sun, 17 Oct 2021 16:06:25 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: simplify a few accesses to fields of structs, using auxiliary X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: 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