Changeset 14282


Ignore:
Timestamp:
May 18, 2014, 8:47:58 PM (8 years ago)
Author:
jordan
Message:

fix tr_cryptoGetTorrentHash() behavior for crypto-test.c

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/crypto-test.c

    r14241 r14282  
    3030
    3131  check (!tr_cryptoHasTorrentHash (&a));
    32 #ifdef NDEBUG
    3332  check (tr_cryptoGetTorrentHash (&a) == NULL);
    34 #endif
    3533
    3634  tr_cryptoSetTorrentHash (&a, hash);
     
    5250  tr_cryptoSetTorrentHash (&a, NULL);
    5351  check (!tr_cryptoHasTorrentHash (&a));
    54 #ifdef NDEBUG
    5552  check (tr_cryptoGetTorrentHash (&a) == NULL);
    56 #endif
    5753
    5854  tr_cryptoDestruct (&a);
  • trunk/libtransmission/crypto.c

    r14241 r14282  
    283283{
    284284  assert (crypto);
    285   assert (crypto->torrentHashIsSet);
    286 
    287   return crypto->torrentHash;
     285
     286  return crypto->torrentHashIsSet ? crypto->torrentHash : NULL;
    288287}
    289288
Note: See TracChangeset for help on using the changeset viewer.