* mdocml: remove a few redundant conditions that jsg@ found with cppcheck
@ 2017-03-03 13:56 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-03-03 13:56 UTC (permalink / raw)
To: source
Log Message:
-----------
remove a few redundant conditions that jsg@ found with cppcheck
Modified Files:
--------------
mdocml:
man.c
mdoc.c
mdoc_html.c
roff.c
Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v
retrieving revision 1.272
retrieving revision 1.273
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.272 -r1.273
--- mdoc_html.c
+++ mdoc_html.c
@@ -666,7 +666,7 @@ mdoc_it_pre(MDOC_ARGS)
enum mdoc_list type;
bl = n->parent;
- while (bl != NULL && bl->tok != MDOC_Bl)
+ while (bl->tok != MDOC_Bl)
bl = bl->parent;
type = bl->norm->Bl.type;
Index: man.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -Lman.c -Lman.c -u -p -r1.167 -r1.168
--- man.c
+++ man.c
@@ -203,7 +203,7 @@ man_pmacro(struct roff_man *man, int ln,
/* Jump to the next non-whitespace word. */
- while (buf[offs] && buf[offs] == ' ')
+ while (buf[offs] == ' ')
offs++;
/*
Index: mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -Lmdoc.c -Lmdoc.c -u -p -r1.260 -r1.261
--- mdoc.c
+++ mdoc.c
@@ -382,7 +382,7 @@ mdoc_pmacro(struct roff_man *mdoc, int l
/* Jump to the next non-whitespace word. */
- while (buf[offs] && ' ' == buf[offs])
+ while (buf[offs] == ' ')
offs++;
/*
Index: roff.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/roff.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -Lroff.c -Lroff.c -u -p -r1.290 -r1.291
--- roff.c
+++ roff.c
@@ -1608,7 +1608,7 @@ roff_parseln(struct roff *r, int ln, str
return ROFF_IGN;
while (buf->buf[pos] != '\0' && buf->buf[pos] != ' ')
pos++;
- while (buf->buf[pos] != '\0' && buf->buf[pos] == ' ')
+ while (buf->buf[pos] == ' ')
pos++;
return tbl_read(r->tbl, ln, buf->buf, pos);
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-03 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 13:56 mdocml: remove a few redundant conditions that jsg@ found with cppcheck 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).