Changeset 61bfc370 in mainline for uspace/srv/net/netif/lo/lo.c
- Timestamp:
- 2011-01-07T18:57:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e08a733
- Parents:
- 7c34b28f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/netif/lo/lo.c
r7c34b28f r61bfc370 53 53 54 54 /** Default hardware address. */ 55 #define DEFAULT_ADDR "\0\0\0\0\0\0"55 #define DEFAULT_ADDR 0 56 56 57 57 /** Default address length. */ 58 #define DEFAULT_ADDR_LEN (sizeof(DEFAULT_ADDR) / sizeof(char))58 #define DEFAULT_ADDR_LEN 6 59 59 60 60 /** Loopback module name. */ … … 62 62 63 63 /** Network interface global data. */ 64 netif_globals_t 64 netif_globals_t netif_globals; 65 65 66 66 int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, … … 74 74 if (!address) 75 75 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; 78 81 address->length = DEFAULT_ADDR_LEN; 79 82 80 83 return EOK; 81 84 }
Note:
See TracChangeset
for help on using the changeset viewer.