summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-06-11 03:21:20 +0000
committermarcel <marcel@FreeBSD.org>2005-06-11 03:21:20 +0000
commit4729e22704b918900bb1994b3fcb15f42911bcb5 (patch)
tree63a7823a70629d566f0231d60f886aa0d721ff7c
parentc9630d0c6a40064d4dd993da325909500f31816c (diff)
downloadFreeBSD-src-4729e22704b918900bb1994b3fcb15f42911bcb5.zip
FreeBSD-src-4729e22704b918900bb1994b3fcb15f42911bcb5.tar.gz
Avoid GCC optimizations from injecting a call to memset(?) in order
to initialize the buffer array in ata_raid_attach() by removing the initializer. There's no memset(?) in the kernel. Instead, assign '\0' to the first element. The buffer array holds strings only, so this is functionally equivalent. Applies to: ia64 Tripped over by: tinderbox
-rw-r--r--sys/dev/ata/ata-raid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index e5aedd1..b8e2ce5 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -113,9 +113,10 @@ static disk_strategy_t ata_raid_strategy;
static void
ata_raid_attach(struct ar_softc *rdp, int writeback)
{
- char buffer[32] = {""};;
+ char buffer[32];
int disk;
+ buffer[0] = '\0';
mtx_init(&rdp->lock, "ATA PseudoRAID metadata lock", NULL, MTX_DEF);
ata_raid_config_changed(rdp, writeback);
OpenPOWER on IntegriCloud