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

tools/rbd, rgw: Removed unreachable returns #16308

Merged
merged 2 commits into from Aug 2, 2017

Conversation

Projects
None yet
3 participants
@joscollin
Copy link
Member

joscollin commented Jul 13, 2017

Removed unreachable returns as the usage() always exits the process. This PR is created as a
follow up of the review in: #16254.

Signed-off-by: Jos Collin jcollin@redhat.com

@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 13, 2017

Jenkins Retest this please

1 similar comment
@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 13, 2017

Jenkins Retest this please

@joscollin joscollin changed the title tools/rbd: Removed unreachable returns [DNM] tools/rbd: Removed unreachable returns Jul 13, 2017

@joscollin joscollin changed the title [DNM] tools/rbd: Removed unreachable returns tools/rbd, rgw: Removed unreachable returns Jul 14, 2017

@joscollin joscollin added the rgw label Jul 14, 2017

@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 14, 2017

Jenkins Retest this please

@joscollin joscollin requested a review from cbodley Jul 21, 2017

@@ -1061,7 +1060,7 @@ static int rbd_nbd(int argc, const char *argv[])
break;
default:
usage();
return -EINVAL;

This comment has been minimized.

Copy link
@dillaman

dillaman Jul 26, 2017

Contributor

Why doesn't this return failure anymore?

@@ -2410,7 +2409,6 @@ int main(int argc, const char **argv)
break;
} else if (ceph_argparse_flag(args, i, "-h", "--help", (char*)NULL)) {
usage();
return 0;

This comment has been minimized.

Copy link
@dillaman

dillaman Jul 26, 2017

Contributor

Shouldn't these return statements be kept to actually stop further processing in this method?

@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 26, 2017

@dillaman Thanks for reviewing. I have removed those returns, as usage() always executes exit(1) for sure. I have specified the same in the PR description.

@dillaman

This comment has been minimized.

Copy link
Contributor

dillaman commented Jul 26, 2017

@joscollin Probably needs to be updated then since usage() does not directly invoke exit(1) -- and if _usage() does, it might be good to add an assert(false) after the call to ensure it's never removed in the future.

joscollin added some commits Jul 13, 2017

tools/rbd: Removed unreachable returns
Removed unreachable returns as the usage() always exits the process.

Signed-off-by: Jos Collin <jcollin@redhat.com>
rgw: Removed unreachable returns
Removed unreachable returns as the usage() always exits the process.

Signed-off-by: Jos Collin <jcollin@redhat.com>

@joscollin joscollin force-pushed the joscollin:wip-rbd-nbd-return-values branch from 55d05e9 to c343d52 Jul 26, 2017

@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 26, 2017

@dillaman Fixed as per your suggestion. Could you please review ? Thanks.

@joscollin

This comment has been minimized.

Copy link
Member Author

joscollin commented Jul 30, 2017

@dillaman ping

@dillaman dillaman added needs-qa and removed needs-review labels Jul 31, 2017

@yuriw yuriw merged commit 22394a5 into ceph:master Aug 2, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@joscollin joscollin deleted the joscollin:wip-rbd-nbd-return-values branch Aug 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.