changeset 79447:d8afd2f46654

(w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping returns NULL on failure.
author Jason Rumney <jasonr@gnu.org>
date Mon, 19 Nov 2007 09:13:58 +0000
parents 76e416798904
children 7eeee580786a
files src/w32bdf.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32bdf.c	Mon Nov 19 07:26:01 2007 +0000
+++ b/src/w32bdf.c	Mon Nov 19 09:13:58 2007 +0000
@@ -261,7 +261,7 @@
       error("Fail to open BDF file");
     }
   hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
-  if (hfilemap == INVALID_HANDLE_VALUE)
+  if (!hfilemap)
     {
       CloseHandle(hfile);
       error("Can't map font");
@@ -828,7 +828,7 @@
   size = fileinfo.nFileSizeLow;
 
   hfilemap = CreateFileMapping (hfile, NULL, PAGE_READONLY, 0, 0, NULL);
-  if (hfilemap == INVALID_HANDLE_VALUE)
+  if (!hfilemap)
     {
       CloseHandle (hfile);
       return 0;