Fix erronous comparaison of flags

Using a binary 'or' mean that we always send the
UUID, even when not required.

Found by coverty scan

Change-Id: Ifc4bff6b2f64febd5d2f038538218c2183518fd5
BUG: 1424815
Signed-off-by: Michael Scherer <misc@redhat.com>
Reviewed-on: https://review.gluster.org/16675
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Tested-by: Shyamsundar Ranganathan <srangana@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
This commit is contained in:
Michael Scherer 2017-02-19 16:54:39 +01:00 committed by Atin Mukherjee
parent 6b42f96d14
commit 420c2d0354

View File

@ -1416,7 +1416,7 @@ __server_get_volume_info (rpcsvc_request_t *req)
goto out;
}
if (flags | (int32_t)GF_GET_VOLUME_UUID) {
if (flags & (int32_t)GF_GET_VOLUME_UUID) {
volume_id_str = gf_strdup (uuid_utoa (volinfo->volume_id));
if (!volume_id_str) {
op_errno = ENOMEM;