lkml.org 
[lkml]   [2011]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] UDPCP Communication Protocol

    stefani@seibold.net wrote:
    +static int udpcp_xmit(struct sock *sk, struct udpcp_dest *dest)
    +{
    + struct udpcp_sock *usk = udpcp_sk(sk);
    + int ret;
    +
    + ret = _udpcp_xmit(sk, dest);
    +
    + if (dest->xmit_wait) {
    + dest->tx_time = jiffies;
    +
    + if (!timer_pending(&usk->timer))
    + udpcp_timer(sk, dest->tx_time + usk->tx_timeout);
    + }
    + return ret;
    +}

    Wouldn't this be slightly nicer as

    static int udpcp_xmit(struct sock *sk, struct udpcp_dest *dest)
    {
    int ret = _udpcp_xmit(sk, dest);

    if (dest->xmit_wait) {
    struct udpcp_sock *usk = udpcp_sk(sk);
    dest->tx_time = jiffies;
    if (!timer_pending(&usk->timer))
    udpcp_timer(sk, dest->tx_time + usk->tx_timeout);
    }
    return ret;
    }

    ??

    --
    Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
    Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
    Plain text mails only, please.



    \
     
     \ /
      Last update: 2011-01-10 23:55    [W:3.700 / U:0.244 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site