Skip to content

Commit

Permalink
flex_array: fix flex_array_put_ptr macro to be valid C
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Paris committed Nov 30, 2010
1 parent c9e86a9 commit c41ab6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/flex_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr);
int flex_array_shrink(struct flex_array *fa);

#define flex_array_put_ptr(fa, nr, src, gfp) \
flex_array_put(fa, nr, &(void *)(src), gfp)
flex_array_put(fa, nr, (void *)&(src), gfp)

void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr);

Expand Down

0 comments on commit c41ab6a

Please sign in to comment.