-
Notifications
You must be signed in to change notification settings - Fork 198
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
dbus/download-pkgs: remove some goto statements #3298
Conversation
static gboolean | ||
osexperimental_handle_download_packages (RPMOSTreeOSExperimental *interface, | ||
GDBusMethodInvocation *invocation, | ||
GUnixFDList* _fds, |
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.
This argument seemed unused in the original code, but I think it's just the result of dbus funky way of handling "out" parameters.
14c1e13
to
e7afec3
Compare
This drops a bunch of goto codepaths from the DBus DownloadPackages handler. The same logic is now expressed with usual GError handling. It aims at making future Rust integration easier by not having to deal with non-linear execution flows.
e7afec3
to
757f2f0
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.
lgtm
glnx_throw (&local_error, "No matches for \"%s\" in repo '%s'", pkg_name, source_name); | ||
goto out; | ||
} | ||
return glnx_prefix_error (error, "No matches for \"%s\" in repo '%s'", pkg_name, source_name); |
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.
Self note: this is wrong, should have been a glnx_throw()
instead, see #3344.
This drops a bunch of goto codepaths from the DBus DownloadPackages
handler.
The same logic is now expressed with usual GError handling.
It aims at making future Rust integration easier by not having to deal
with non-linear execution flows.