From 090a96d0a5963bc62efc3354480e277610cab7e6 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sun, 7 Feb 2010 04:30:20 +0000 Subject: dht: Remove pointer casting in layout handling Small changes by Anand Avati over original submission: Remove pointer casting (copy data to proper memory before using it). Fixes bug #493. Hello, See bug #493 for more information on this patch. http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=493#c2 This patch assumes that the scope of disk_layout is local wherever it is used. Seems correct, not really checked, though. Greetings, Hraban Luyat Signed-off-by: Hraban Luyat Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 493 (tcp + dht + armv5tel: ???brick: disk layout has invalid count 29696???) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=493 --- xlators/cluster/dht/src/dht-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.h') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index ca4a1d33e10..53aeaa0f7a6 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -217,7 +217,7 @@ int dht_layout_merge (xlator_t *this, dht_layout_t *layout, xlator_t *subvol, int dht_disk_layout_extract (xlator_t *this, dht_layout_t *layout, int pos, int32_t **disk_layout_p); int dht_disk_layout_merge (xlator_t *this, dht_layout_t *layout, - int pos, int32_t *disk_layout); + int pos, void *disk_layout_raw); int dht_frame_return (call_frame_t *frame); -- cgit