aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-01-04 15:38:49 +0100
committerBert Münnich <ber.t@posteo.de>2015-01-04 21:24:43 +0100
commit9b9294bae67da4e0388e7c31d0063f4e114aa1f8 (patch)
tree8a9a6ece7fb48b548a75cae28dfe4b4acb99d3c3 /image.c
parent0cb1d1130568d61c06a2cdd22ab050973e302fc8 (diff)
downloadnsxiv-9b9294bae67da4e0388e7c31d0063f4e114aa1f8.tar.zst
Use bit-field for boolean flags in fileinfo struct
Diffstat (limited to 'image.c')
-rw-r--r--image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/image.c b/image.c
index ee9c30d..240054f 100644
--- a/image.c
+++ b/image.c
@@ -292,7 +292,7 @@ bool img_load_gif(img_t *img, const fileinfo_t *file)
DGifCloseFile(gif);
#endif
- if (err && file->warn)
+ if (err && (file->flags & FF_WARN))
warn("corrupted gif file: %s", file->name);
if (img->multi.cnt > 1) {
@@ -321,7 +321,7 @@ bool img_load(img_t *img, const fileinfo_t *file)
if (access(file->path, R_OK) < 0 ||
(img->im = imlib_load_image(file->path)) == NULL)
{
- if (file->warn)
+ if (file->flags & FF_WARN)
warn("could not open image: %s", file->name);
return false;
}