Skip to content

Commit

Permalink
Staging: dst: Fix parentheses
Browse files Browse the repository at this point in the history
`|' has a higher precedence than `?' so since MSG_WAITALL is
defined 0x100, MSG_MORE was always written to the msg_flag.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent a5c330f commit 6c8e49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/dst/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int dst_data_send_header(struct socket *sock,
msg.msg_namelen = 0;
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = MSG_WAITALL | (more)?MSG_MORE:0;
msg.msg_flags = MSG_WAITALL | (more ? MSG_MORE : 0);

err = kernel_sendmsg(sock, &msg, &iov, 1, iov.iov_len);
if (err != size) {
Expand Down

0 comments on commit 6c8e49d

Please sign in to comment.