Changeset 133 for trunk/src/sh_hash.c
- Timestamp:
- Oct 25, 2007, 12:19:05 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r132 r133 430 430 file_type * theFile; 431 431 char * str; 432 char hashbuf[KEYBUF_SIZE]; 432 433 433 434 /* -------- find the entry for the file ---------------- */ … … 438 439 p = hashsearch( sh_tiger_hash(fullpath, 439 440 TIGER_DATA, 440 sl_strlen(fullpath)) 441 sl_strlen(fullpath), 442 hashbuf, sizeof(hashbuf)) 441 443 ); 442 444 if (p == NULL) … … 1116 1118 SL_TICKET open_tmp (void); 1117 1119 #endif 1120 char hashbuf[KEYBUF_SIZE]; 1118 1121 1119 1122 SL_ENTER(_("sh_hash_init")); … … 1144 1147 sl_rewind (fd); 1145 1148 1146 tiger_fd = fd;1147 1149 sl_strlcpy (sh.data.hash, 1148 1150 sh_tiger_hash (file_path('C', 'R'), /*irrelevant, TIGER_FD*/ 1149 TIGER_FD, 0),1151 fd, 0, hashbuf, sizeof(hashbuf)), 1150 1152 KEY_LEN+1); 1151 1153 sl_rewind (fd); … … 1173 1175 file_path('D', 'R'))); 1174 1176 1175 tiger_fd = fd;1176 1177 if (0 != sl_strncmp(sh.data.hash, 1177 sh_tiger_hash (file_path('D', 'R'), TIGER_FD, 0), 1178 sh_tiger_hash (file_path('D', 'R'), fd, 0, 1179 hashbuf, sizeof(hashbuf)), 1178 1180 KEY_LEN) 1179 1181 && sh.flag.checkSum != SH_CHECK_INIT) … … 1550 1552 else 1551 1553 { 1554 char hashbuf[KEYBUF_SIZE]; 1555 1552 1556 sl_strlcpy(fullpath, 1553 1557 sh_tiger_hash (buf->fullpath, 1554 TIGER_DATA, old_len), 1558 TIGER_DATA, old_len, 1559 hashbuf, sizeof(hashbuf)), 1555 1560 KEY_LEN+1); 1556 1561 } … … 1587 1592 else 1588 1593 { 1594 char hashbuf[KEYBUF_SIZE]; 1589 1595 sl_strlcpy(linkpath, 1590 1596 sh_tiger_hash (buf->linkpath, 1591 TIGER_DATA, old_len), 1597 TIGER_DATA, old_len, 1598 hashbuf, sizeof(hashbuf)), 1592 1599 KEY_LEN+1); 1593 1600 } … … 1828 1835 { 1829 1836 sh_file_t * p; 1837 char hashbuf[KEYBUF_SIZE]; 1830 1838 1831 1839 SL_ENTER(_("sh_hash_have_it_int")); … … 1839 1847 p = hashsearch(newname); 1840 1848 else 1841 p = hashsearch ( sh_tiger_hash(newname, TIGER_DATA, sl_strlen(newname)) ); 1849 p = hashsearch ( sh_tiger_hash(newname, TIGER_DATA, sl_strlen(newname), 1850 hashbuf, sizeof(hashbuf)) ); 1842 1851 if (p == NULL) 1843 1852 SL_RETURN( (NULL), _("sh_hash_have_it_int")); … … 1919 1928 { 1920 1929 sh_file_t * p; 1930 char hashbuf[KEYBUF_SIZE]; 1921 1931 1922 1932 SL_ENTER(_("sh_hash_set_visited_int")); … … 1930 1940 p = hashsearch(newname); 1931 1941 else 1932 p = hashsearch (sh_tiger_hash(newname, TIGER_DATA, sl_strlen(newname))); 1942 p = hashsearch (sh_tiger_hash(newname, TIGER_DATA, sl_strlen(newname), 1943 hashbuf, sizeof(hashbuf))); 1933 1944 1934 1945 if (p == NULL) … … 2120 2131 char * linkpath; 2121 2132 char * attr_string = NULL; 2133 char hashbuf[KEYBUF_SIZE]; 2122 2134 2123 2135 SL_ENTER(_("sh_hash_push_int")); … … 2170 2182 fullpath = SH_ALLOC(KEY_LEN + 1); 2171 2183 sl_strlcpy(fullpath, 2172 sh_tiger_hash (buf->fullpath, TIGER_DATA, len), 2184 sh_tiger_hash (buf->fullpath, TIGER_DATA, len, 2185 hashbuf, sizeof(hashbuf)), 2173 2186 KEY_LEN+1); 2174 2187 } … … 2187 2200 linkpath = SH_ALLOC(KEY_LEN + 1); 2188 2201 sl_strlcpy(linkpath, 2189 sh_tiger_hash (buf->linkpath, TIGER_DATA, len), 2202 sh_tiger_hash (buf->linkpath, TIGER_DATA, len, 2203 hashbuf, sizeof(hashbuf)), 2190 2204 KEY_LEN+1); 2191 2205 } … … 2616 2630 char log_policy[32]; 2617 2631 int log_severity; 2632 char hashbuf[KEYBUF_SIZE]; 2618 2633 2619 2634 SL_ENTER(_("sh_hash_compdata")); … … 2636 2651 p = hashsearch( sh_tiger_hash(theFile->fullpath, 2637 2652 TIGER_DATA, 2638 sl_strlen(theFile->fullpath)) 2653 sl_strlen(theFile->fullpath), 2654 hashbuf, sizeof(hashbuf)) 2639 2655 ); 2640 2656 … … 2739 2755 sh_tiger_hash(theFile->linkpath, 2740 2756 TIGER_DATA, 2741 sl_strlen(theFile->linkpath)), 2757 sl_strlen(theFile->linkpath), 2758 hashbuf, sizeof(hashbuf)), 2742 2759 MAX_PATH_STORE+1); 2743 2760 maxcomp = MAX_PATH_STORE;
Note:
See TracChangeset
for help on using the changeset viewer.