resolv.conf option parsing: Fix word separation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Oct 2014 11:06:09 +0000 (11:06 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Oct 2014 12:03:33 +0000 (12:03 +0000)
`nextword' does not nul-terminate the words it returns.  So the
strcmps in ccf_options are wrong.  Fix this as follows:

 * Abolish most uses of l in favour of a pointer variable endword.
 * Have OPTION_IS and OPTION_STARTS update word, and endword, so
   that it is convenient to use them for option values, etc.
 * Save the whole option in new variables opt and optend for
   reporting and to assist the `adns_af:' loop.
 * Use OPTION_IS, OPTION_STARTS and memchr, rather than strcmp,
   ad-hoc memcmp, and strcspn.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>

No differences found