diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/image.c b/src/image.c index 7ecd59d27b4..c085e6e63eb 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -316,7 +316,6 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 316 | int xhot, yhot, result; | 316 | int xhot, yhot, result; |
| 317 | ptrdiff_t id; | 317 | ptrdiff_t id; |
| 318 | Lisp_Object found; | 318 | Lisp_Object found; |
| 319 | int fd; | ||
| 320 | char *filename; | 319 | char *filename; |
| 321 | 320 | ||
| 322 | /* Look for an existing bitmap with the same name. */ | 321 | /* Look for an existing bitmap with the same name. */ |
| @@ -332,10 +331,8 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 332 | } | 331 | } |
| 333 | 332 | ||
| 334 | /* Search bitmap-file-path for the file, if appropriate. */ | 333 | /* Search bitmap-file-path for the file, if appropriate. */ |
| 335 | fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); | 334 | if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK)) < 0) |
| 336 | if (fd < 0) | ||
| 337 | return -1; | 335 | return -1; |
| 338 | emacs_close (fd); | ||
| 339 | 336 | ||
| 340 | filename = SSDATA (found); | 337 | filename = SSDATA (found); |
| 341 | 338 | ||
| @@ -2260,7 +2257,8 @@ x_find_image_file (Lisp_Object file) | |||
| 2260 | else | 2257 | else |
| 2261 | { | 2258 | { |
| 2262 | file_found = ENCODE_FILE (file_found); | 2259 | file_found = ENCODE_FILE (file_found); |
| 2263 | close (fd); | 2260 | if (fd != -2) |
| 2261 | emacs_close (fd); | ||
| 2264 | } | 2262 | } |
| 2265 | 2263 | ||
| 2266 | return file_found; | 2264 | return file_found; |
| @@ -8054,7 +8052,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 8054 | 8052 | ||
| 8055 | init_color_table (); | 8053 | init_color_table (); |
| 8056 | 8054 | ||
| 8057 | #ifdef HAVE_MAGICKEXPORTIMAGEPIXELS | 8055 | #if defined (HAVE_MAGICKEXPORTIMAGEPIXELS) && ! defined (HAVE_NS) |
| 8058 | if (imagemagick_render_type != 0) | 8056 | if (imagemagick_render_type != 0) |
| 8059 | { | 8057 | { |
| 8060 | /* Magicexportimage is normally faster than pixelpushing. This | 8058 | /* Magicexportimage is normally faster than pixelpushing. This |