Skip to content

Commit

Permalink
handle: fix cast
Browse files Browse the repository at this point in the history
Cast 'user' to 'struct kdbus_item __user *' to silence a sparse warning.

Signed-off-by: Daniel Mack <daniel@zonque.org>
  • Loading branch information
zonque committed Feb 21, 2015
1 parent c7ec113 commit a505680
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ static int kdbus_args_negotiate(struct kdbus_args *args)
return 0;

negotiation = args->argv[0].item;
user = (void *)((u8 __user *)args->user +
((u8 *)negotiation - (u8 *)args->cmd));
user = (struct kdbus_item __user *)
((u8 __user *)args->user +
((u8 *)negotiation - (u8 *)args->cmd));
num = KDBUS_ITEM_PAYLOAD_SIZE(negotiation) / sizeof(u64);

for (i = 0; i < num; ++i) {
Expand Down

0 comments on commit a505680

Please sign in to comment.