Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165216042
D58495.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58495.diff
View Options
diff --git a/contrib/mandoc/mdoc.c b/contrib/mandoc/mdoc.c
--- a/contrib/mandoc/mdoc.c
+++ b/contrib/mandoc/mdoc.c
@@ -165,8 +165,7 @@
mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs)
{
struct roff_node *n;
- const char *cp, *sp;
- char *c, *ws, *end;
+ char *c, *ws, *end, *cp, *sp;
n = mdoc->last;
diff --git a/contrib/mandoc/out.c b/contrib/mandoc/out.c
--- a/contrib/mandoc/out.c
+++ b/contrib/mandoc/out.c
@@ -457,8 +457,8 @@
tblcalc_literal(struct rofftbl *tbl, struct roffcol *col,
const struct tbl_dat *dp, size_t mw)
{
- const char *str; /* Beginning of the first line. */
- const char *beg; /* Beginning of the current line. */
+ char *str; /* Beginning of the first line. */
+ char *beg; /* Beginning of the current line. */
char *end; /* End of the current line. */
/* Widths in basic units. */
diff --git a/contrib/mandoc/read.c b/contrib/mandoc/read.c
--- a/contrib/mandoc/read.c
+++ b/contrib/mandoc/read.c
@@ -628,7 +628,7 @@
int
mparse_open(struct mparse *curp, const char *file)
{
- char *cp;
+ const char *cp;
int fd, save_errno;
cp = strrchr(file, '.');
@@ -645,10 +645,12 @@
*/
if ( ! curp->gzip) {
+ char *fn;
+
save_errno = errno;
- mandoc_asprintf(&cp, "%s.gz", file);
- fd = open(cp, O_RDONLY);
- free(cp);
+ mandoc_asprintf(&fn, "%s.gz", file);
+ fd = open(fn, O_RDONLY);
+ free(fn);
errno = save_errno;
if (fd != -1) {
curp->gzip = 1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 7, 9:47 PM (15 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36131894
Default Alt Text
D58495.diff (1 KB)
Attached To
Mode
D58495: mandoc: Const correctness for C23
Attached
Detach File
Event Timeline
Log In to Comment