Hi,
On Tue, May 18, 2021 at 07:23:44PM -0400, Selva Nair wrote:
> > while ((line = strsep(&lines, "\n")))
> > {
> > - /* skip empty lines */
> > - if (strlen(line) == 0)
> > + /* ignore leading whitespace */
> > + while(isspace(*line))
> > + {
> > + line++;
> > + }
> > + /* skip empty lines and comment lines */
> > + if (strlen(line) == 0 || *line == '#')
>
> As we support two comment characters ('#' and ';'), would be better to
> do the same here too.
Good point. v2 is on the way.
> One could relax the requirement of comment as
> the first character using parse_line(), but this looks generous
> enough.
The "ignore leading whitespace" part takes care of this :-) - I looked
at parse_line() but it seemed a bit heavy handed to me.
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
