diff options
| author | Sheetal Pamecha <spamecha@redhat.com> | 2019-07-05 16:51:45 +0530 | 
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2019-07-09 07:49:53 +0000 | 
| commit | d0d77953ed4020a8c7ac87073bd5e6c4743bc961 (patch) | |
| tree | 914fdacd57f46775682ed1de1f2ec7a6767ac6cd /xlators | |
| parent | 4c44c47a40910c70e7d22d2bc6b7c21b88e3296b (diff) | |
glusterd: fix packed member address warning
warning: taking address of packed member of
‘struct _quota_limits’ may result in an
unaligned pointer value.
Change-Id: Ib889c99184560f0d24dbcc4fae10b563a2b9b7fd
updates: bz#1193929
Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quota.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index fafdb80be1d..bff02d5f451 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -813,6 +813,7 @@ glusterd_set_quota_limit(char *volname, char *path, char *hard_limit,          0,      };      double soft_limit_double = 0; +    int64_t local_hl = 0;      this = THIS;      GF_ASSERT(this); @@ -862,11 +863,11 @@ glusterd_set_quota_limit(char *volname, char *path, char *hard_limit,      new_limit.sl = hton64(new_limit.sl); -    ret = gf_string2bytesize_int64(hard_limit, &new_limit.hl); +    ret = gf_string2bytesize_int64(hard_limit, &local_hl);      if (ret)          goto out; -    new_limit.hl = hton64(new_limit.hl); +    new_limit.hl = hton64(local_hl);      ret = sys_lsetxattr(abspath, key, (char *)(void *)&new_limit,                          sizeof(new_limit), 0);  | 
