input/chronovu_la8: address file size data type nits
Although the file format handled by this input module appears to be of fixed size (8MiB plus 5 more bytes), it's more reliable to use a data type for the file size that is larger than "an int". Although off_t would be most portable, use uint64_t to match the code which passes the parameter to the input module.
This commit is contained in:
parent
0dabb880af
commit
f54a55da2d
|
@ -39,7 +39,7 @@ struct context {
|
||||||
|
|
||||||
static int format_match(GHashTable *metadata, unsigned int *confidence)
|
static int format_match(GHashTable *metadata, unsigned int *confidence)
|
||||||
{
|
{
|
||||||
int size;
|
uint64_t size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In the absence of a reliable condition like magic strings,
|
* In the absence of a reliable condition like magic strings,
|
||||||
|
@ -47,7 +47,7 @@ static int format_match(GHashTable *metadata, unsigned int *confidence)
|
||||||
* rather weak a condition, signal "little confidence" and
|
* rather weak a condition, signal "little confidence" and
|
||||||
* optionally give precedence to better matches.
|
* optionally give precedence to better matches.
|
||||||
*/
|
*/
|
||||||
size = GPOINTER_TO_INT(g_hash_table_lookup(metadata,
|
size = GPOINTER_TO_SIZE(g_hash_table_lookup(metadata,
|
||||||
GINT_TO_POINTER(SR_INPUT_META_FILESIZE)));
|
GINT_TO_POINTER(SR_INPUT_META_FILESIZE)));
|
||||||
if (size != CHRONOVU_LA8_FILESIZE)
|
if (size != CHRONOVU_LA8_FILESIZE)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
Loading…
Reference in New Issue