Skip to content

Commit b62069e

Browse files
committed
Avoid a cast
This cast and rename of the `void *arg` to `struct pfdata *pfd` isn't necessary, we can change the argument type to the actual type, because the function is called only once and therefore always with an argument of the `struct pfdata *` type.
1 parent 5b3b1d7 commit b62069e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/OVAL/probes/independent/textfilecontent54_probe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ struct pfdata {
118118
oscap_pcre_t *compiled_regex;
119119
};
120120

121-
static int process_file(const char *prefix, const char *path, const char *file, void *arg, oval_schema_version_t over)
121+
static int process_file(const char *prefix, const char *path, const char *file, struct pfdata *pfd, oval_schema_version_t over)
122122
{
123-
struct pfdata *pfd = (struct pfdata *) arg;
124123
int ret = 0, path_len, file_len, cur_inst = 0, fd = -1, substr_cnt,
125124
buf_size = 0, buf_used = 0, ofs = 0, buf_inc = 4096;
126125
char **substrs = NULL;

0 commit comments

Comments
 (0)