Messages in this thread | | | From | Roland Dreier <> | Subject | Re: [PATCH 3rd_time] scsi: fix operator precedence warning | Date | Mon, 26 Apr 2010 09:56:12 -0700 |
| |
> - *tcp_source_port_num = (uint16_t) mbox_sts[6] >> 16; > + *tcp_source_port_num = (uint16_t) (mbox_sts[6] >> 16);
I wonder why we need that cast at all? The fact that tcp_source_port_num is a uint16_t* should cause the value to get truncated properly anyway.
But I agree that this patch is a minimal fix for a real bug. -- Roland Dreier <rolandd@cisco.com> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html
| |