itss: Remove unneeded casts.
This commit is contained in:
parent
507daae427
commit
f4e67137a5
|
@ -739,7 +739,7 @@ struct chmFile *chm_openW(const WCHAR *filename)
|
||||||
sremain = _CHM_ITSP_V1_LEN;
|
sremain = _CHM_ITSP_V1_LEN;
|
||||||
sbufpos = sbuffer;
|
sbufpos = sbuffer;
|
||||||
if (_chm_fetch_bytes(newHandle, sbuffer,
|
if (_chm_fetch_bytes(newHandle, sbuffer,
|
||||||
(UInt64)itsfHeader.dir_offset, sremain) != sremain ||
|
itsfHeader.dir_offset, sremain) != sremain ||
|
||||||
!_unmarshal_itsp_header(&sbufpos, &sremain, &itspHeader))
|
!_unmarshal_itsp_header(&sbufpos, &sremain, &itspHeader))
|
||||||
{
|
{
|
||||||
chm_close(newHandle);
|
chm_close(newHandle);
|
||||||
|
@ -1042,7 +1042,7 @@ int chm_resolve_object(struct chmFile *h,
|
||||||
|
|
||||||
/* try to fetch the index page */
|
/* try to fetch the index page */
|
||||||
if (_chm_fetch_bytes(h, page_buf,
|
if (_chm_fetch_bytes(h, page_buf,
|
||||||
(UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
|
h->dir_offset + (UInt64)curPage*h->block_len,
|
||||||
h->block_len) != h->block_len)
|
h->block_len) != h->block_len)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, page_buf);
|
HeapFree(GetProcessHeap(), 0, page_buf);
|
||||||
|
@ -1105,10 +1105,10 @@ static int _chm_get_cmpblock_bounds(struct chmFile *h,
|
||||||
dummy = buffer;
|
dummy = buffer;
|
||||||
remain = 8;
|
remain = 8;
|
||||||
if (_chm_fetch_bytes(h, buffer,
|
if (_chm_fetch_bytes(h, buffer,
|
||||||
(UInt64)h->data_offset
|
h->data_offset
|
||||||
+ (UInt64)h->rt_unit.start
|
+ h->rt_unit.start
|
||||||
+ (UInt64)h->reset_table.table_offset
|
+ h->reset_table.table_offset
|
||||||
+ (UInt64)block*8,
|
+ block*8,
|
||||||
remain) != remain ||
|
remain) != remain ||
|
||||||
!_unmarshal_uint64(&dummy, &remain, start))
|
!_unmarshal_uint64(&dummy, &remain, start))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1117,10 +1117,10 @@ static int _chm_get_cmpblock_bounds(struct chmFile *h,
|
||||||
dummy = buffer;
|
dummy = buffer;
|
||||||
remain = 8;
|
remain = 8;
|
||||||
if (_chm_fetch_bytes(h, buffer,
|
if (_chm_fetch_bytes(h, buffer,
|
||||||
(UInt64)h->data_offset
|
h->data_offset
|
||||||
+ (UInt64)h->rt_unit.start
|
+ h->rt_unit.start
|
||||||
+ (UInt64)h->reset_table.table_offset
|
+ h->reset_table.table_offset
|
||||||
+ (UInt64)block*8 + 8,
|
+ block*8 + 8,
|
||||||
remain) != remain ||
|
remain) != remain ||
|
||||||
!_unmarshal_int64(&dummy, &remain, len))
|
!_unmarshal_int64(&dummy, &remain, len))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1133,10 +1133,10 @@ static int _chm_get_cmpblock_bounds(struct chmFile *h,
|
||||||
dummy = buffer;
|
dummy = buffer;
|
||||||
remain = 8;
|
remain = 8;
|
||||||
if (_chm_fetch_bytes(h, buffer,
|
if (_chm_fetch_bytes(h, buffer,
|
||||||
(UInt64)h->data_offset
|
h->data_offset
|
||||||
+ (UInt64)h->rt_unit.start
|
+ h->rt_unit.start
|
||||||
+ (UInt64)h->reset_table.table_offset
|
+ h->reset_table.table_offset
|
||||||
+ (UInt64)block*8,
|
+ block*8,
|
||||||
remain) != remain ||
|
remain) != remain ||
|
||||||
!_unmarshal_uint64(&dummy, &remain, start))
|
!_unmarshal_uint64(&dummy, &remain, start))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1339,7 +1339,7 @@ LONGINT64 chm_retrieve_object(struct chmFile *h,
|
||||||
/* read data */
|
/* read data */
|
||||||
return _chm_fetch_bytes(h,
|
return _chm_fetch_bytes(h,
|
||||||
buf,
|
buf,
|
||||||
(UInt64)h->data_offset + (UInt64)ui->start + (UInt64)addr,
|
h->data_offset + ui->start + addr,
|
||||||
len);
|
len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1382,7 +1382,7 @@ int chm_enumerate(struct chmFile *h,
|
||||||
Int32 curPage;
|
Int32 curPage;
|
||||||
|
|
||||||
/* buffer to hold whatever page we're looking at */
|
/* buffer to hold whatever page we're looking at */
|
||||||
UChar *page_buf = HeapAlloc(GetProcessHeap(), 0, (unsigned int)h->block_len);
|
UChar *page_buf = HeapAlloc(GetProcessHeap(), 0, h->block_len);
|
||||||
struct chmPmglHeader header;
|
struct chmPmglHeader header;
|
||||||
UChar *end;
|
UChar *end;
|
||||||
UChar *cur;
|
UChar *cur;
|
||||||
|
@ -1403,7 +1403,7 @@ int chm_enumerate(struct chmFile *h,
|
||||||
/* try to fetch the index page */
|
/* try to fetch the index page */
|
||||||
if (_chm_fetch_bytes(h,
|
if (_chm_fetch_bytes(h,
|
||||||
page_buf,
|
page_buf,
|
||||||
(UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
|
h->dir_offset + (UInt64)curPage*h->block_len,
|
||||||
h->block_len) != h->block_len)
|
h->block_len) != h->block_len)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, page_buf);
|
HeapFree(GetProcessHeap(), 0, page_buf);
|
||||||
|
@ -1495,7 +1495,7 @@ int chm_enumerate_dir(struct chmFile *h,
|
||||||
Int32 curPage;
|
Int32 curPage;
|
||||||
|
|
||||||
/* buffer to hold whatever page we're looking at */
|
/* buffer to hold whatever page we're looking at */
|
||||||
UChar *page_buf = HeapAlloc(GetProcessHeap(), 0, (unsigned int)h->block_len);
|
UChar *page_buf = HeapAlloc(GetProcessHeap(), 0, h->block_len);
|
||||||
struct chmPmglHeader header;
|
struct chmPmglHeader header;
|
||||||
UChar *end;
|
UChar *end;
|
||||||
UChar *cur;
|
UChar *cur;
|
||||||
|
@ -1540,7 +1540,7 @@ int chm_enumerate_dir(struct chmFile *h,
|
||||||
/* try to fetch the index page */
|
/* try to fetch the index page */
|
||||||
if (_chm_fetch_bytes(h,
|
if (_chm_fetch_bytes(h,
|
||||||
page_buf,
|
page_buf,
|
||||||
(UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
|
h->dir_offset + (UInt64)curPage*h->block_len,
|
||||||
h->block_len) != h->block_len)
|
h->block_len) != h->block_len)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, page_buf);
|
HeapFree(GetProcessHeap(), 0, page_buf);
|
||||||
|
|
Loading…
Reference in New Issue