Minor, fix calloc call order

This commit is contained in:
Ebrahim Byagowi 2018-04-22 10:58:37 +04:30 committed by GitHub
parent 2a4cdfad20
commit 8100380d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -572,7 +572,7 @@ hb_blob_create_from_file (const char *file_name)
int fd = open (file_name, (writable ? O_RDWR : O_RDONLY) | _O_BINARY, 0); int fd = open (file_name, (writable ? O_RDWR : O_RDONLY) | _O_BINARY, 0);
if (unlikely (fd == -1)) return hb_blob_get_empty (); if (unlikely (fd == -1)) return hb_blob_get_empty ();
hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (sizeof (hb_mapped_file_t), 1); hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t));
struct stat st; struct stat st;
if (unlikely (fstat (fd, &st) == -1)) goto fail; if (unlikely (fstat (fd, &st) == -1)) goto fail;