mirror of
https://github.com/transmission/transmission
synced 2024-12-26 17:47:37 +00:00
use correct value in sizeof
This commit is contained in:
parent
c1f0bb6607
commit
e3bd0f0ec7
1 changed files with 2 additions and 2 deletions
|
@ -1382,7 +1382,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
- (void) setFileCheckState: (int) state forIndexes: (NSIndexSet *) indexSet
|
||||
{
|
||||
NSUInteger count = [indexSet count], i = 0, index;
|
||||
tr_file_index_t * files = malloc(count * sizeof(int));
|
||||
tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t));
|
||||
for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
|
||||
{
|
||||
files[i] = index;
|
||||
|
@ -1399,7 +1399,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
- (void) setFilePriority: (int) priority forIndexes: (NSIndexSet *) indexSet
|
||||
{
|
||||
NSUInteger count = [indexSet count], i = 0, index;
|
||||
tr_file_index_t * files = malloc(count * sizeof(int));
|
||||
tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t));
|
||||
for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
|
||||
{
|
||||
files[i] = index;
|
||||
|
|
Loading…
Reference in a new issue