Changeset 3bacee1 in mainline for uspace/srv/net


Ignore:
Timestamp:
2018-04-12T16:27:17Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/srv/net
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/dnsrsrv/dns_msg.c

    r76d0981d r3bacee1  
    383383        question->qtype = dns_uint16_t_decode(pdu->data + name_eoff,
    384384            pdu->size - name_eoff);
    385         question->qclass = dns_uint16_t_decode(pdu->data + sizeof(uint16_t)
    386             + name_eoff, pdu->size - sizeof(uint16_t) - name_eoff);
     385        question->qclass = dns_uint16_t_decode(pdu->data + sizeof(uint16_t) +
     386            name_eoff, pdu->size - sizeof(uint16_t) - name_eoff);
    387387        *eoff = name_eoff + 2 * sizeof(uint16_t);
    388388
     
    449449
    450450        log_msg(LOG_DEFAULT, LVL_DEBUG2, "dns_rr_decode: rtype=0x%x, rclass=0x%x, ttl=0x%x",
    451             rr->rtype, rr->rclass, rr->ttl );
     451            rr->rtype, rr->rclass, rr->ttl);
    452452
    453453        rdlength = dns_uint16_t_decode(bp, bsz);
     
    510510            (msg->rd ? BIT_V(uint16_t, OPB_RD) : 0) |
    511511            (msg->ra ? BIT_V(uint16_t, OPB_RA) : 0) |
    512             msg->rcode
    513         );
     512            msg->rcode);
    514513
    515514        hdr.qd_count = host2uint16_t_be(list_count(&msg->question));
  • uspace/srv/net/ethip/pdu.c

    r76d0981d r3bacee1  
    124124
    125125        switch (packet->opcode) {
    126         case aop_request: fopcode = AOP_REQUEST; break;
    127         case aop_reply: fopcode = AOP_REPLY; break;
     126        case aop_request:
     127                fopcode = AOP_REQUEST;
     128                break;
     129        case aop_reply:
     130                fopcode = AOP_REPLY;
     131                break;
    128132        default:
    129133                assert(false);
     
    187191
    188192        switch (uint16_t_be2host(pfmt->opcode)) {
    189         case AOP_REQUEST: packet->opcode = aop_request; break;
    190         case AOP_REPLY: packet->opcode = aop_reply; break;
     193        case AOP_REQUEST:
     194                packet->opcode = aop_request;
     195                break;
     196        case AOP_REPLY:
     197                packet->opcode = aop_reply;
     198                break;
    191199        default:
    192200                log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
  • uspace/srv/net/inetsrv/pdu.c

    r76d0981d r3bacee1  
    7272
    7373        for (i = 0; i < words; i++) {
    74                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     74                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7575                sum = inet_ocadd16(sum, w);
    7676        }
    7777
    7878        if (size % 2 != 0) {
    79                 w = ((uint16_t)bdata[2*words] << 8);
     79                w = ((uint16_t)bdata[2 * words] << 8);
    8080                sum = inet_ocadd16(sum, w);
    8181        }
  • uspace/srv/net/slip/slip.c

    r76d0981d r3bacee1  
    284284                 */
    285285
    286 pass:
     286        pass:
    287287                rc = iplink_ev_recv(&slip_iplink, &sdu, ip_v4);
    288288                if (rc != EOK) {
     
    374374        if (rc != EOK) {
    375375                log_msg(LOG_DEFAULT, LVL_ERROR,
    376                    "Failed to register service %s",
    377                    linkstr);
     376                    "Failed to register service %s",
     377                    linkstr);
    378378                goto fail;
    379379        }
  • uspace/srv/net/tcp/conn.c

    r76d0981d r3bacee1  
    156156
    157157        /* Initialize retransmission queue */
    158         if (tcp_tqueue_init(&conn->retransmit, conn, &tcp_conn_tqueue_cb)
    159             != EOK) {
     158        if (tcp_tqueue_init(&conn->retransmit, conn, &tcp_conn_tqueue_cb) !=
     159            EOK) {
    160160                goto error;
    161161        }
  • uspace/srv/net/tcp/inet.c

    r76d0981d r3bacee1  
    9797        if (hdr_size < sizeof(tcp_header_t)) {
    9898                log_msg(LOG_DEFAULT, LVL_WARN, "hdr_size = %zu < sizeof(tcp_header_t) = %zu",
    99                     hdr_size, sizeof(tcp_header_t));            return EINVAL;
     99                    hdr_size, sizeof(tcp_header_t));
     100                return EINVAL;
    100101        }
    101102
  • uspace/srv/net/tcp/pdu.c

    r76d0981d r3bacee1  
    7373
    7474        for (i = 0; i < words; i++) {
    75                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     75                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7676                sum = tcp_ocadd16(sum, w);
    7777        }
    7878
    7979        if (size % 2 != 0) {
    80                 w = ((uint16_t)bdata[2*words] << 8);
     80                w = ((uint16_t)bdata[2 * words] << 8);
    8181                sum = tcp_ocadd16(sum, w);
    8282        }
  • uspace/srv/net/tcp/seq_no.c

    r76d0981d r3bacee1  
    170170
    171171        /* Beginning of segment is inside window */
    172         b_in = seq_no_le_lt(conn->rcv_nxt, seg->seq, conn->rcv_nxt
    173             + conn->rcv_wnd);
     172        b_in = seq_no_le_lt(conn->rcv_nxt, seg->seq, conn->rcv_nxt +
     173            conn->rcv_wnd);
    174174
    175175        /* End of segment is inside window */
  • uspace/srv/net/tcp/test/conn.c

    r76d0981d r3bacee1  
    139139
    140140        while (conn->cstate == st_syn_sent)
    141                 fibril_condvar_wait(&conn->cstate_cv, &conn->lock);
     141                fibril_condvar_wait(&conn->cstate_cv, &conn->lock);
    142142
    143143        PCUT_ASSERT_INT_EQUALS(st_closed, conn->cstate);
     
    194194        /* Wait for client-side state to transition */
    195195        while (cconn->cstate == st_syn_sent)
    196                 fibril_condvar_wait(&cconn->cstate_cv, &cconn->lock);
     196                fibril_condvar_wait(&cconn->cstate_cv, &cconn->lock);
    197197
    198198        PCUT_ASSERT_INT_EQUALS(st_established, cconn->cstate);
     
    203203        tcp_conn_lock(sconn);
    204204        while (sconn->cstate == st_listen || sconn->cstate == st_syn_received)
    205                 fibril_condvar_wait(&sconn->cstate_cv, &sconn->lock);
     205                fibril_condvar_wait(&sconn->cstate_cv, &sconn->lock);
    206206
    207207        PCUT_ASSERT_INT_EQUALS(st_established, sconn->cstate);
  • uspace/srv/net/tcp/test/rqueue.c

    r76d0981d r3bacee1  
    107107        seg_cnt = 0;
    108108
    109         inet_ep2_init(&epp);
     109        inet_ep2_init(&epp);
    110110
    111111        tcp_rqueue_fibril_start();
  • uspace/srv/net/tcp/test/seq_no.c

    r76d0981d r3bacee1  
    130130        conn->rcv_wnd = (uint32_t) -10;
    131131
    132         PCUT_ASSERT_FALSE(seq_no_in_rcv_wnd(conn,19));
     132        PCUT_ASSERT_FALSE(seq_no_in_rcv_wnd(conn, 19));
    133133        PCUT_ASSERT_TRUE(seq_no_in_rcv_wnd(conn, 20));
    134134        PCUT_ASSERT_TRUE(seq_no_in_rcv_wnd(conn, 21));
  • uspace/srv/net/udp/pdu.c

    r76d0981d r3bacee1  
    7272
    7373        for (i = 0; i < words; i++) {
    74                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     74                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7575                sum = udp_ocadd16(sum, w);
    7676        }
    7777
    7878        if (size % 2 != 0) {
    79                 w = ((uint16_t)bdata[2*words] << 8);
     79                w = ((uint16_t)bdata[2 * words] << 8);
    8080                sum = udp_ocadd16(sum, w);
    8181        }
Note: See TracChangeset for help on using the changeset viewer.