From 5ad87a93fefcb94ee5f28de8d75903b2550c8d94 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 25 Apr 2018 16:44:04 +0430 Subject: [PATCH] Minor, improve file reading failing condition comment https://bugzilla.gnome.org/show_bug.cgi?id=659212 for more context --- src/hb-blob.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-blob.cc b/src/hb-blob.cc index d15a7cb3b..710765d10 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -577,7 +577,8 @@ hb_blob_create_from_file (const char *file_name) struct stat st; if (unlikely (fstat (fd, &st) == -1)) goto fail; - // If the file size is 0 and isn't regular, give up + // If the file size is 0 and is a regular file, give up + // See https://github.com/GNOME/glib/blob/f9faac7/glib/gmappedfile.c#L139-L142 if (unlikely (st.st_size == 0 && S_ISREG (st.st_mode))) goto fail; file->length = (unsigned long) st.st_size;