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

Remove unused error variable #150

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove unused error variable
Since 'error' is not passed in to setup_axparameter(), it will not be
set in case setup_axparameter() fails. However, it wasn't possible to
get setup_axparameter() to fail. Both ax_parameter_new() and
ax_parameter_register_callback() are apparently valid to call even
with a non-existing application name.
  • Loading branch information
killenheladagen committed Mar 22, 2024
commit 463a50d78750bd760277e716b17f9a95583a0507
5 changes: 2 additions & 3 deletions app/dockerdwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,14 @@ setup_axparameter(void)
end:
if (!success && ax_parameter != NULL) {
ax_parameter_free(ax_parameter);
ax_parameter = NULL;
}
return ax_parameter;
}

int
main(void)
{
GError *error = NULL;
AXParameter *ax_parameter = NULL;
exit_code = 0;

Expand All @@ -672,7 +672,7 @@ main(void)
// Setup ax_parameter
ax_parameter = setup_axparameter();
if (ax_parameter == NULL) {
syslog(LOG_ERR, "Error in setup_axparameter: %s", error->message);
syslog(LOG_ERR, "Error in setup_axparameter");
exit_code = -1;
goto end;
}
Expand Down Expand Up @@ -708,6 +708,5 @@ main(void)
ax_parameter_free(ax_parameter);
}

g_clear_error(&error);
return exit_code;
}