Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup config parsing #47

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Cleanup config parsing #47

wants to merge 16 commits into from

Conversation

pames
Copy link
Contributor

@pames pames commented Oct 9, 2012

Can someone take a look at this? I forgot to submit this a while ago. Basically, tries to make the config parsing block less of an eyesore.

if(apr_stat(&f, value, APR_FINFO_TYPE, cmd->temp_pool) == APR_INCOMPLETE)
return(apr_psprintf(cmd->pool, "MOD_AUTH_CAS: Could not find CASCookiePath '%s'", value));
if ((errno == ERANGE && (l == LONG_MAX || l == LONG_MIN)) ||
(errno != 0 && l == 0) || l < 0 || *eptr != '\0') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems rather convoluted: if (errno != 0 || *eptr != '\0' || l < 0) should be enough, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's convoluted (taken from man strtol) but the more succint version you suggest is clearly sufficient.

@bnoordhuis
Copy link
Contributor

Some nits but mostly LGTM. I would suggest to rebase and squash it into sensible commits.

@pames
Copy link
Contributor Author

pames commented Nov 8, 2012

OK, I think I addressed all your comments, and I tried to rebase/squash but I have no clue if I did it right :-)

@bnoordhuis
Copy link
Contributor

Okay, so ideally you'd do something like this:

$ git fetch origin
$ git rebase origin/master
# fix merge conflicts, if any
$ git rebase -i origin/master

And end up with two commits - one that removes CASAllowWildcardCert, the other that reworks option parsing - that you can fast-forward merge into the master branch (if you were working from a feature-branch). You get bonus karma for nice kernel-style commit logs. :-)

Aside from that, it LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants