Skip to content

Commit 551f972

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 a2201c1 commit 551f972

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/OVAL/probes/independent/xmlfilecontent_probe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ static xmlDocPtr strip_ns(xmlDocPtr doc)
142142
return result;
143143
}
144144

145-
static int process_file(const char *prefix, const char *path, const char *filename, void *arg)
145+
static int process_file(const char *prefix, const char *path, const char *filename, struct pfdata *pfd)
146146
{
147-
struct pfdata *pfd = (struct pfdata *) arg;
148147
int ret = 0, path_len, filename_len;
149148
char *whole_path = NULL;
150149
xmlDoc *doc = NULL;

0 commit comments

Comments
 (0)