-
Notifications
You must be signed in to change notification settings - Fork 66
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
If an argument option returns an error we no longer try to load defa… #612
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @carbonneau1 thanks for tracking this down and fixing it. I have two code suggestions below. Also, please change your commit message to conform to the same standard we use for ZFS and Lustre,
Very Short (72 chars or less) summary (including utility if only one changed)
A blank line after the summary before the longer description (critical)
More detailed explanatory text. Wrap it to 72 characters. Give the
motivation for the change (ie "fixes a seg fault triggered by a double-free
when dsync is run with options dsync -o fubar") and a summary
of the code change(s).
A longer description of some good things things to think about with
commit messages is at https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53
If the parser fails we set the usage flag and avoid any other operations.
5319abb
to
7284d81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
For the commit message(s), can you add "dsync: " to the beginning of the summary (first line) since these changes don't affect any other utility?
It just makes it easier, later, if someone is looking for a change that fixed or created a bug they care about.
Then I'll approve and merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
When passing a wrong expression/conjunction to the -o option a segmentation violation occured.
We were trying to free the conjunction twice.
Also once the error message was issued by the parser we did not check it before trying to set the default options causing an assert.
We now give the error messages an print the usage.