On Sun, 2005-06-12 at 12:09 +0300, Michael S. Tsirkin wrote:
> > Index: linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c
> > ===================================================================
> > --- linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c   
> > (revision 2577)
> > +++ linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c   
> > (working copy)
> > @@ -129,9 +129,9 @@ MODULE_PARM_DESC(sdp_debug_level,
> >   */
> >  void sdp_inet_wake_send(struct sock *sk)
> >  {
> > -   struct sdp_opt *conn;
> > +   struct sdp_opt *conn = sdp_sk(sk);
> >  
> > -   if (!sk || !(conn = SDP_GET_CONN(sk)))
> > +   if (!sk)
> >             return;
> >  
> >     if (sk->sk_socket && test_bit(SOCK_NOSPACE, &sk->sk_socket->flags) &&
> 
> I didnt look at this in depth, but is it safe to call sdp_sk(sk) if sk may
> be NULL as the above seems to do?

Yes, it should be safe as all sdp_sk() does is a cast.

-tduffy

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to