Skip to content

Commit 998dd4a

Browse files
Defenso-QTHemaste
authored andcommitted
libcasper: explicit cast in cap_fileargs header
The implicit cast is incompatible with standard compiler options in a C++ project, making the library difficult to use. Signed-off-by: Quentin Thébault <[email protected]> Sponsored by: Defenso MFC after: 3 days Discussed with: kevans Reviewed by: emaste, vexeduxr Pull request: #1857 (cherry picked from commit 349da4d)
1 parent 146b7bb commit 998dd4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libcasper/services/cap_fileargs/cap_fileargs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fileargs_init(int argc __unused, char *argv[] __unused, int flags, mode_t mode,
7575
cap_rights_t *rightsp __unused, int operations __unused) {
7676
fileargs_t *fa;
7777

78-
fa = malloc(sizeof(*fa));
78+
fa = (fileargs_t *)malloc(sizeof(*fa));
7979
if (fa != NULL) {
8080
fa->fa_flags = flags;
8181
fa->fa_mode = mode;

0 commit comments

Comments
 (0)