From ea4964df6f173b17eaf4e9048f55cfe969907663 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Sun, 15 Jul 2018 12:20:04 +0300 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit