Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 64be561 in mainline


Ignore:
Timestamp:
2012-07-24T14:23:34Z (9 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master
Children:
7ef2249
Parents:
4a6da62
Message:

nic: Minor cleanup of nic_add_db after switch from hash_set to hash_table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/src/nic_addr_db.c

    r4a6da62 r64be561  
    4444#include <macros.h>
    4545
    46 
    47 
    48 /* Couple address bytes into KEY_CNT key fields. Align up to fit all bytes. */
    49 //#define KEY_CNT ((NIC_ADDR_MAX_LENGTH + sizeof(unsigned long) - 1) / sizeof(unsigned long))
     46/* The key count hash table field is not used. Use this dummy value. */
    5047#define KEY_CNT 1
    5148
     
    7168        const link_t *item)
    7269{
    73         /* Ugly type-punning hack. */
    7470        uint8_t *addr = (uint8_t*)key;
    7571        nic_addr_entry_t *entry = member_to_inst(item, nic_addr_entry_t, link);
     
    9490        nic_addr_entry_t *entry = member_to_inst(item, nic_addr_entry_t, link);
    9591       
    96         /* Ugly type-punning hack. */
    9792        unsigned long *key = (unsigned long*)entry->addr;
    9893        return nic_addr_key_hash(key);
Note: See TracChangeset for help on using the changeset viewer.