diff options
author | Varun Shastry <vshastry@redhat.com> | 2012-09-17 15:44:16 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-09-17 21:19:37 -0700 |
commit | f7342ad3a91ac5140e9c24e20007519847f4f4ec (patch) | |
tree | b611dbab90e234c95bd525743e6fc4fa6ed0a64e /xlators/cluster/afr/src | |
parent | 4d0895c966f38355950d22ce378579fd35b7c9b2 (diff) |
Clean up of typepunning errors ( Strict aliasing warnings )
Change-Id: I48733967facc526fb523a8dc9bd068f8c5cc5971
BUG: 764282
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3950
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index ddcd0bca37a..4130adc6f17 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -570,6 +570,7 @@ afr_hash_child (int32_t *success_children, int32_t child_count, unsigned int hmode, uuid_t gfid) { uuid_t gfid_copy = {0,}; + pid_t pid; if (!hmode) { return -1; @@ -588,7 +589,8 @@ afr_hash_child (int32_t *success_children, int32_t child_count, * perfection here. All we need is a low probability that * multiple clients won't converge on the same subvolume. */ - *((pid_t *)gfid_copy) = getpid(); + pid = getpid(); + memcpy (gfid_copy, &pid, sizeof(pid)); } return SuperFastHash((char *)gfid_copy, |