Changeset a676574 in mainline for uspace/srv/net/netif/lo/lo.c


Ignore:
Timestamp:
2011-01-09T12:18:00Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
54de5ebd
Parents:
a3eeef45 (diff), 9d12059 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/netif/lo/lo.c

    ra3eeef45 ra676574  
    5353
    5454/** Default hardware address. */
    55 #define DEFAULT_ADDR            "\0\0\0\0\0\0"
     55#define DEFAULT_ADDR  0
    5656
    5757/** Default address length. */
    58 #define DEFAULT_ADDR_LEN        (sizeof(DEFAULT_ADDR) / sizeof(char))
     58#define DEFAULT_ADDR_LEN  6
    5959
    6060/** Loopback module name. */
     
    6262
    6363/** Network interface global data. */
    64 netif_globals_t netif_globals;
     64netif_globals_t netif_globals;
    6565
    6666int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
     
    7474        if (!address)
    7575                return EBADMEM;
    76 
    77         address->value = str_dup(DEFAULT_ADDR);
     76       
     77        uint8_t *addr = (uint8_t *) malloc(DEFAULT_ADDR_LEN);
     78        memset(addr, DEFAULT_ADDR, DEFAULT_ADDR_LEN);
     79       
     80        address->value = addr;
    7881        address->length = DEFAULT_ADDR_LEN;
    79 
     82       
    8083        return EOK;
    8184}
Note: See TracChangeset for help on using the changeset viewer.