}
/* if we havent read the header before, set the header data */
- if (E_FREAD(buf, 1, PNG_BYTES_TO_CHECK, f) != 1)
+ if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1)
{
- *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+ *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
goto close_file;
}
if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1)
{
fclose(ffile);
- *error = EVAS_LOAD_ERROR_GENERIC;
+ *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
return EINA_FALSE;
}
/* Apparently rewind(f) isn't sufficient */
- fseek(ffile, (long)0, SEEK_SET);
+ fseek(ffile, 0, SEEK_SET);
if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */
&& (magic_number != TIFF_LITTLEENDIAN))