Skip to content

Commit

Permalink
checkpolicy: drop superfluous return value
Browse files Browse the repository at this point in the history
The function avrule_merge_ioctls() has no failure conditions and always
returns 0.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
  • Loading branch information
cgzones committed Jan 20, 2024
1 parent 1fa2185 commit d214847
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions checkpolicy/policy_define.c
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ static int avrule_sort_ioctls(struct av_ioctl_range_list **rangehead)
return -1;
}

static int avrule_merge_ioctls(struct av_ioctl_range_list **rangehead)
static void avrule_merge_ioctls(struct av_ioctl_range_list **rangehead)
{
struct av_ioctl_range_list *r, *tmp;
r = *rangehead;
Expand All @@ -1949,7 +1949,6 @@ static int avrule_merge_ioctls(struct av_ioctl_range_list **rangehead)
}
r = r->next;
}
return 0;
}

static int avrule_read_ioctls(struct av_ioctl_range_list **rangehead)
Expand Down Expand Up @@ -2070,8 +2069,7 @@ static int avrule_ioctl_ranges(struct av_ioctl_range_list **rangelist)
/* sort and merge the input ioctls */
if (avrule_sort_ioctls(&rangehead))
return -1;
if (avrule_merge_ioctls(&rangehead))
return -1;
avrule_merge_ioctls(&rangehead);
/* flip ranges if these are omitted */
if (omit) {
if (avrule_omit_ioctls(&rangehead))
Expand Down

0 comments on commit d214847

Please sign in to comment.