diff options
author | NeilBrown <neilb@suse.de> | 2010-03-03 00:54:17 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-03-03 00:54:17 +0100 |
commit | fcf5762500297536d3c3376945684c4f654ffe44 (patch) | |
tree | df16a74f63ba3739e467c62e580f6bcc7f019389 /restripe.c | |
parent | Fix warning about unused variable. (diff) | |
download | mdadm-fcf5762500297536d3c3376945684c4f654ffe44.tar.xz mdadm-fcf5762500297536d3c3376945684c4f654ffe44.zip |
Add _FORTIFY_SOURCE to mdadm.O2 build.
When building mdadm.O2, set _FORTIFY_SOURCE to get more
warnings, and also build mdmon.O2 to find warnings in that
code too.
Then fix the warnings.
Suggested-by: Luca Berra <bluca@comedia.it>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'restripe.c')
-rw-r--r-- | restripe.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -565,7 +565,8 @@ int restore_stripes(int *dest, unsigned long long *offsets, int data_disks = raid_disks - (level == 0 ? 0 : level <= 5 ? 1 : 2); - posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size); + if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size)) + stripe_buf = NULL; if (zero == NULL) { zero = malloc(chunk_size); if (zero) |