diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-12-28 13:04:36 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-12-31 06:51:07 +0000 |
commit | 1ea203d6b6960621c6b445db42d6254c726df321 (patch) | |
tree | 655bbe8cd6b69bfcd7b1adc3b056a20716826435 /api/src/glfs-fops.c | |
parent | 7a84e705ed0b96f479a0fc52fa734e0367bb2af2 (diff) |
libgfapi : fix coverity issue
This patch fixes coverity issue in api/src/glfs-fops.c.
CID: 1389247, 1389296, 1389369, 1389392.
All coverity defects are of type Mixing enum types (MIXED_ENUMS).
updates: bz#789278
Change-Id: I007bb317ed5f0b8ddaf94a93b3a4d02b1e74cb8d
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r-- | api/src/glfs-fops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index a534697fc12..03a15e6913c 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -5945,16 +5945,18 @@ GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_get_stat, 3.11.0); void gf_lease_to_glfs_lease(struct gf_lease *gf_lease, struct glfs_lease *lease) { + u_int lease_type = gf_lease->lease_type; lease->cmd = gf_lease->cmd; - lease->lease_type = gf_lease->lease_type; + lease->lease_type = lease_type; memcpy(lease->lease_id, gf_lease->lease_id, LEASE_ID_SIZE); } void glfs_lease_to_gf_lease(struct glfs_lease *lease, struct gf_lease *gf_lease) { + u_int lease_type = lease->lease_type; gf_lease->cmd = lease->cmd; - gf_lease->lease_type = lease->lease_type; + gf_lease->lease_type = lease_type; memcpy(gf_lease->lease_id, lease->lease_id, LEASE_ID_SIZE); } |