Skip to content

Commit fc9d30a

Browse files
committed
Use const modifiers
1 parent 6d2fe65 commit fc9d30a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/XCCDF/item.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,11 @@ void xccdf_item_add_applicable_platform(struct xccdf_item *item, xmlTextReaderPt
770770
size_t match_len = ovector[1] - ovector[0];
771771
/* match_len + 1 underscore + 1 zero byte */
772772
char *alternate_platform_idref = malloc(match_len + 1 + 1);
773-
int first_group_start = ovector[2];
774-
int first_group_end = ovector[3];
773+
const int first_group_start = ovector[2];
774+
const int first_group_end = ovector[3];
775775
size_t first_group_len = first_group_end - first_group_start;
776-
int second_group_start = ovector[4];
777-
int second_group_end = ovector[5];
776+
const int second_group_start = ovector[4];
777+
const int second_group_end = ovector[5];
778778
size_t second_group_len = second_group_end - second_group_start;
779779
char *aptr = alternate_platform_idref;
780780
strncpy(aptr, platform_idref + first_group_start, first_group_len);

0 commit comments

Comments
 (0)