From: Stéphane Graber Date: Wed, 12 Feb 2014 21:12:39 +0000 (-0500) Subject: coverity: Don't store fgets return value if we don't use it X-Git-Tag: lxc-1.0.0.rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad9f44bcdc0bdf100f563d75e16d985886b2a26;p=thirdparty%2Flxc.git coverity: Don't store fgets return value if we don't use it Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index cd40247d5..8eccd367d 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1151,7 +1151,7 @@ static int mount_check_fs( const char *dir, char *fstype ) f = fopen("/proc/self/mounts", "r"); if (!f) return 0; - while ((p = fgets(buf, LINELEN, f))) { + while (fgets(buf, LINELEN, f)) { p = index(buf, ' '); if( !p ) continue; @@ -1444,7 +1444,7 @@ int detect_shared_rootfs(void) f = fopen("/proc/self/mountinfo", "r"); if (!f) return 0; - while ((p = fgets(buf, LINELEN, f))) { + while (fgets(buf, LINELEN, f)) { for (p = buf, i=0; p && i < 4; i++) p = index(p+1, ' '); if (!p)