]> git.saurik.com Git - bison.git/commit - src/reader.c
style: use a for loop instead of a while loop, and scope reduction
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 1 Feb 2013 16:52:01 +0000 (17:52 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 4 Feb 2013 15:46:54 +0000 (16:46 +0100)
commit06505b0c69485c906ed183dcf200d11fd6fce400
treef1a06fb7c4c0309b30f9c6a167b16018fb673f8e
parente96415a54b81ffea9d8e510e98a6c866510bb593
style: use a for loop instead of a while loop, and scope reduction

* src/reader.c (packgram): Improve readability.
The parser calls grammar_current_rule_end at the end of every rhs,
which adds a NULL to separate the rules.  So there is no need to
check whether "p" is non-null before proceeding.
src/reader.c