From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: simplify a few accesses to fields of structs, using auxiliary
Date: Sun, 17 Oct 2021 16:06:25 -0500 (EST) [thread overview]
Message-ID: <c2ab195ede288c78@mandoc.bsd.lv> (raw)
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
reply other threads:[~2021-10-17 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2ab195ede288c78@mandoc.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).