Changeset 257feec in mainline for uspace/srv/net/inetsrv/pdu.c


Ignore:
Timestamp:
2013-06-27T12:48:32Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f391e9
Parents:
679ee84
Message:

cstyle (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/pdu.c

    r679ee84 r257feec  
    203203
    204204        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_pdu_decode()");
    205 
     205       
    206206        if (size < sizeof(ip_header_t)) {
    207207                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
     
    223223                return EINVAL;
    224224        }
    225 
     225       
    226226        if (tot_len > size) {
    227227                log_msg(LOG_DEFAULT, LVL_DEBUG, "Total Length = %zu > PDU size = %zu",
     
    242242        packet->ttl = hdr->ttl;
    243243        packet->ident = ident;
    244 
     244       
    245245        packet->df = (flags_foff & BIT_V(uint16_t, FF_FLAG_DF)) != 0;
    246246        packet->mf = (flags_foff & BIT_V(uint16_t, FF_FLAG_MF)) != 0;
    247247        packet->offs = foff * FRAG_OFFS_UNIT;
    248 
     248       
    249249        /* XXX IP options */
    250250        data_offs = sizeof(uint32_t) * BIT_RANGE_EXTRACT(uint8_t, VI_IHL_h,
     
    257257                return ENOMEM;
    258258        }
    259 
    260         memcpy(packet->data, (uint8_t *)data + data_offs, packet->size);
    261 
     259       
     260        memcpy(packet->data, (uint8_t *) data + data_offs, packet->size);
     261       
    262262        return EOK;
    263263}
Note: See TracChangeset for help on using the changeset viewer.