Changeset 1b59023 in mainline


Ignore:
Timestamp:
2010-12-16T17:13:44Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f87c900
Parents:
7837101
Message:

Remove the rest of CONVERT_SIZE uses and the CONVERT_SIZE macro altogether.

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/net/modules.h

    r7837101 r1b59023  
    4949#include <sys/time.h>
    5050
    51 /** Converts the data length between different types.
    52  *
    53  * @param[in] type_from The source type.
    54  * @param[in] type_to   The destination type.
    55  * @param[in] count     The number units of the source type size.
    56  */
    57 #define CONVERT_SIZE(type_from, type_to, count) \
    58         ((sizeof(type_from) / sizeof(type_to)) * (count))
    59 
    6051/** Registers the module service at the name server.
    6152 *
  • uspace/srv/hw/netif/dp8390/dp8390_module.c

    r7837101 r1b59023  
    197197                return rc;
    198198        address->value = (char *) (&((dpeth_t *) device->specific)->de_address);
    199         address->length = CONVERT_SIZE(ether_addr_t, char, 1);
     199        address->length = sizeof(ether_addr_t);
    200200        return EOK;
    201201}
  • uspace/srv/net/il/ip/ip.c

    r7837101 r1b59023  
    442442                if (route) {
    443443                        address.value = (char *) &route->address.s_addr;
    444                         address.length = CONVERT_SIZE(in_addr_t, char, 1);
     444                        address.length = sizeof(in_addr_t);
    445445                       
    446446                        rc = arp_device_req(ip_netif->arp->phone,
     
    10051005                destination.value = route->gateway.s_addr ?
    10061006                    (char *) &route->gateway.s_addr : (char *) &dest.s_addr;
    1007                 destination.length = CONVERT_SIZE(dest.s_addr, char, 1);
     1007                destination.length = sizeof(dest.s_addr);
    10081008
    10091009                rc = arp_translate_req(netif->arp->phone, netif->device_id,
Note: See TracChangeset for help on using the changeset viewer.