From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: remove a few redundant conditions that jsg@ found with cppcheck
Date: Fri, 3 Mar 2017 08:56:02 -0500 (EST) [thread overview]
Message-ID: <989226450587718931.enqueue@fantadrom.bsd.lv> (raw)
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
reply other threads:[~2017-03-03 13:56 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=989226450587718931.enqueue@fantadrom.bsd.lv \
--to=schwarze@mdocml.bsd.lv \
--cc=source@mdocml.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).