[lxc-devel] [PATCH 5/7] coverity: Don't store fgets return value if we don't use it

Stéphane Graber stgraber at ubuntu.com
Wed Feb 12 21:45:54 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index cd40247..8eccd36 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)
-- 
1.9.rc1



More information about the lxc-devel mailing list