Skip to content
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
1 change: 1 addition & 0 deletions src/XCCDF_POLICY/xccdf_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
return oscap_iterator_new_filter(policy->model->engines, (oscap_filter_func) xccdf_policy_engine_filter, (void *) sysname);
}

char *xccdf_policy_get_readable_item_title(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang)

Check warning on line 135 in src/XCCDF_POLICY/xccdf_policy.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "item" is "struct xccdf_item *".

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AaFimSDqihrwxr0uCLAU&open=AaFimSDqihrwxr0uCLAU&pullRequest=2464
{
struct oscap_text_iterator *title_it = xccdf_item_get_title(item);
char *unresolved = oscap_textlist_get_preferred_plaintext(title_it, preferred_lang);
Expand All @@ -144,11 +144,11 @@
return resolved;
}

char *xccdf_policy_get_readable_item_description(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang)

Check warning on line 147 in src/XCCDF_POLICY/xccdf_policy.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "item" is "struct xccdf_item *".

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AaFimSDqihrwxr0uCLAV&open=AaFimSDqihrwxr0uCLAV&pullRequest=2464
{
/* Get description in prefered language */
struct oscap_text_iterator *description_it = xccdf_item_get_description(item);
struct oscap_text *unresolved_text = oscap_textlist_get_preferred_text(description_it, preferred_lang);

Check warning on line 151 in src/XCCDF_POLICY/xccdf_policy.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "unresolved_text" is "struct oscap_text *".

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AaFimSDqihrwxr0uCLAW&open=AaFimSDqihrwxr0uCLAW&pullRequest=2464
oscap_text_iterator_free(description_it);
if (!unresolved_text)
return oscap_strdup("");
Expand Down Expand Up @@ -2208,6 +2208,7 @@
oscap_seterr(OSCAP_EFAMILY_XCCDF,
"Rule '%s' not found in selected profile.", rule_id);
oscap_htable_iterator_free(rit);
xccdf_result_free(result);
return NULL;
}
}
Expand Down
Loading