mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 02:31:05 +00:00
2009-05-08 Pavel Roskin <proski@gnu.org>
* disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's not modified.
This commit is contained in:
1 parent
041b8094ac
commit
752473c2b0
3 files changed
+8
-4
No files matched your search
@@ -1,5 +1,8 @@
|
|||||||
2009-05-08 Pavel Roskin <proski@gnu.org>
|
2009-05-08 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
|
||||||
|
not modified.
|
||||||
|
|
||||||
* disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
|
* disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
|
||||||
uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
|
uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
|
||||||
Initialize them with -1. Add sanity check for bad1. Eliminate
|
Initialize them with -1. Add sanity check for bad1. Eliminate
|
||||||
|
|||||||
+4
-3
@@ -172,12 +172,13 @@ grub_raid_close (grub_disk_t disk __attribute ((unused)))
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_raid_block_xor (char *buf1, char *buf2, int size)
|
grub_raid_block_xor (char *buf1, const char *buf2, int size)
|
||||||
{
|
{
|
||||||
grub_size_t *p1, *p2;
|
grub_size_t *p1;
|
||||||
|
const grub_size_t *p2;
|
||||||
|
|
||||||
p1 = (grub_size_t *) buf1;
|
p1 = (grub_size_t *) buf1;
|
||||||
p2 = (grub_size_t *) buf2;
|
p2 = (const grub_size_t *) buf2;
|
||||||
size /= GRUB_CPU_SIZEOF_VOID_P;
|
size /= GRUB_CPU_SIZEOF_VOID_P;
|
||||||
|
|
||||||
while (size)
|
while (size)
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ void grub_raid_register (grub_raid_t raid);
|
|||||||
void grub_raid_unregister (grub_raid_t raid);
|
void grub_raid_unregister (grub_raid_t raid);
|
||||||
|
|
||||||
void grub_raid_rescan (void);
|
void grub_raid_rescan (void);
|
||||||
void grub_raid_block_xor (char *buf1, char *buf2, int size);
|
void grub_raid_block_xor (char *buf1, const char *buf2, int size);
|
||||||
|
|
||||||
typedef grub_err_t (*grub_raid5_recover_func_t) (struct grub_raid_array *array,
|
typedef grub_err_t (*grub_raid5_recover_func_t) (struct grub_raid_array *array,
|
||||||
int disknr, char *buf,
|
int disknr, char *buf,
|
||||||
|
|||||||
Reference in new issue
Block a user