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.
static int format_match(GHashTable *metadata, unsigned int *confidence)
{
- int size;
+ uint64_t size;
/*
* In the absence of a reliable condition like magic strings,
* rather weak a condition, signal "little confidence" and
* 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)));
if (size != CHRONOVU_LA8_FILESIZE)
return SR_ERR;