summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-07-15 12:20:04 +0300
committerAtin Mukherjee <amukherj@redhat.com>2018-07-20 12:41:42 +0000
commitea4964df6f173b17eaf4e9048f55cfe969907663 (patch)
treea21e9ff0b4c02a401465c9e6fe11fa4616651032
parent1ee1666df5a5f30075536c6816582bbdad229f27 (diff)
glusterd-quota.c: fix coverity warning (BAD_COMPARE)
See https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2018-07-13-1718f9c6/html/1/6glusterd-quota.c.html#error Only compile tested! Change-Id: Ief42f9fcdb02ad001bd39c4a6e27e7fa86fd2496 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index ed135d41f64..6ca7da8f1d0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -386,7 +386,7 @@ _glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv,
pid_dir, brickpath);
if ((len >= 0) && (len < sizeof(pidfile))) {
pidfp = fopen (pidfile, "w");
- if (pidfp >= 0) {
+ if (pidfp != NULL) {
fprintf (pidfp, "%d\n", runner.chpid);
fflush (pidfp);
fclose (pidfp);