Commit c41ab6a1b9028de33e74101cb0aae13098a56fdb
1 parent
c9e86a9b95
Exists in
master
and in
4 other branches
flex_array: fix flex_array_put_ptr macro to be valid C
Using flex_array_put_ptr() results in a compile error "error: lvalue required as unary ‘&’ operand" fix the casting order to fix this. Signed-off-by: Eric Paris <eparis@redhat.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
include/linux/flex_array.h
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | int flex_array_shrink(struct flex_array *fa); |
72 | 72 | |
73 | 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ |
74 | - flex_array_put(fa, nr, &(void *)(src), gfp) | |
74 | + flex_array_put(fa, nr, (void *)&(src), gfp) | |
75 | 75 | |
76 | 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); |
77 | 77 |