Changeset 614 for trunk/kernel/libk/xhtab.c
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/xhtab.c
r612 r614 42 42 // XHTAB_DENTRY_TYPE 43 43 // This functions compute the hash index from the key, that is the directory entry name. 44 // In this implementation, the index value is simply the ASCII code of the first 45 // character, to provide an approximate lexicographic order. 44 46 /////////////////////////////////////////////////////////////////////////////////////////// 45 47 // @ key : local pointer on name. … … 49 51 { 50 52 char * name = key; 51 uint32_t index = 0; 53 54 return (name[0] % XHASHTAB_SIZE); 55 /* 56 uint32_t index = 0; 52 57 while( *name ) 53 58 { … … 55 60 } 56 61 return index % XHASHTAB_SIZE; 62 */ 63 57 64 } 58 65
Note: See TracChangeset
for help on using the changeset viewer.