summaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-08-10 12:01:14 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-08-10 12:01:14 +0200
commitad68e324c61b708dfd903f2c5fda79f40b87b8bf (patch)
treee11e92e39ea5c9244be69f5f66d93339719873ed /src/image.c
parent34b55a222ef1ce3ecc18df12a96cd7eea5fffd60 (diff)
download0xFFFF-ad68e324c61b708dfd903f2c5fda79f40b87b8bf.tar.bz2
Fix ERROR macros
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c
index ba756c0..6e7d500 100644
--- a/src/image.c
+++ b/src/image.c
@@ -198,7 +198,7 @@ struct image * image_alloc_from_file(const char * file, const char * type, const
image->is_shared_fd = 0;
image->fd = open(file, O_RDONLY);
if ( image->fd < 0 ) {
- ERROR(errno, "Cannot open image file %s", file);
+ ERROR_INFO("Cannot open image file %s", file);
free(image);
return NULL;
}
@@ -234,7 +234,7 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui
image_append(image, type, device, hwrevs, version, layout);
if ( ! noverify && image->hash != hash ) {
- ERROR(0, "Image hash mishmash (counted %#04x, got %#04x)", image->hash, hash);
+ ERROR("Image hash mishmash (counted %#04x, got %#04x)", image->hash, hash);
image_free(image);
return NULL;
}
@@ -314,7 +314,7 @@ size_t image_read(struct image * image, void * buf, size_t count) {
else
new_count = count - ret_count;
- memset(buf+ret_count, 0xFF, new_count);
+ memset((unsigned char *)buf+ret_count, 0xFF, new_count);
ret_count += new_count;
image->acur += new_count;