File tree 1 file changed +4
-12
lines changed
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -381,20 +381,14 @@ static int64 xattr_lookup_hash(const item_list *xalp)
381
381
{
382
382
const rsync_xa * rxas = xalp -> items ;
383
383
size_t i ;
384
- int64 key = hashlittle (& xalp -> count , sizeof xalp -> count );
384
+ int64 key = hashlittle2 (& xalp -> count , sizeof xalp -> count );
385
385
386
386
for (i = 0 ; i < xalp -> count ; i ++ ) {
387
- key += hashlittle (rxas [i ].name , rxas [i ].name_len );
387
+ key += hashlittle2 (rxas [i ].name , rxas [i ].name_len );
388
388
if (rxas [i ].datum_len > MAX_FULL_DATUM )
389
- key += hashlittle (rxas [i ].datum , xattr_sum_len );
389
+ key += hashlittle2 (rxas [i ].datum , xattr_sum_len );
390
390
else
391
- key += hashlittle (rxas [i ].datum , rxas [i ].datum_len );
392
- }
393
-
394
- if (key == 0 ) {
395
- /* This is very unlikely, but we should never
396
- * return 0 as hashtable_find() doesn't like it. */
397
- return 1 ;
391
+ key += hashlittle2 (rxas [i ].datum , rxas [i ].datum_len );
398
392
}
399
393
400
394
return key ;
@@ -475,8 +469,6 @@ static int rsync_xal_store(item_list *xalp)
475
469
476
470
if (rsync_xal_h == NULL )
477
471
rsync_xal_h = hashtable_create (512 , HT_KEY64 );
478
- if (rsync_xal_h == NULL )
479
- out_of_memory ("rsync_xal_h hashtable_create()" );
480
472
481
473
new_ref = new0 (rsync_xa_list_ref );
482
474
new_ref -> ndx = ndx ;
You can’t perform that action at this time.
0 commit comments