]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - bitmap.c
trivial warn_unused_result squashing
[thirdparty/mdadm.git] / bitmap.c
index 86176696f957edef9d88955e869612ba6c47de85..0f8a26538ace6eb450c128c3af82b3ad11e9f9b0 100644 (file)
--- a/bitmap.c
+++ b/bitmap.c
@@ -125,7 +125,10 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
        void *buf;
        int n, skip;
 
-       posix_memalign(&buf, 512, 8192);
+       if (posix_memalign(&buf, 512, 8192) != 0) {
+               fprintf(stderr, Name ": failed to allocate 8192 bytes\n");
+               return NULL;
+       }
        n = read(fd, buf, 8192);
 
        info = malloc(sizeof(*info));