hash-64bit-cast.diff 680 B

12345678910111213141516171819202122
  1. From: Wayne Davison <wayned@samba.org>
  2. Date: Tue, 22 Jul 2008 06:11:23 +0000 (-0700)
  3. Subject: Explicitly cast an int64 to an int32.
  4. X-Git-Url: http://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=aad635f766c450cd2cfac5fe5705213a417050b4;hp=a72f37bb67f16c2d5a17bae77f7a82bcfdd96a9c
  5. Explicitly cast an int64 to an int32.
  6. ---
  7. diff --git a/hashtable.c b/hashtable.c
  8. index 7da907c..1775a0b 100644
  9. --- a/hashtable.c
  10. +++ b/hashtable.c
  11. @@ -142,7 +142,7 @@ void *hashtable_find(struct hashtable *tbl, int64 key, int allocate_if_missing)
  12. if (key64)
  13. ((struct ht_int64_node*)node)->key = key;
  14. else
  15. - node->key = key;
  16. + node->key = (int32)key;
  17. tbl->entries++;
  18. return node;
  19. }