[Pkg-wmaker-commits] [wmifinfo] 30/49: wmifinfo: Fix -Wunused-result compiler warnings.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 02:07:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmifinfo.

commit a816b960c1cf0ab1fa4af9f8f1d4d97874b448b7
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Dec 8 21:01:51 2014 -0600

    wmifinfo: Fix -Wunused-result compiler warnings.
---
 wmifinfo.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wmifinfo.c b/wmifinfo.c
index cc6ee99..3ddf026 100644
--- a/wmifinfo.c
+++ b/wmifinfo.c
@@ -355,7 +355,10 @@ void exec_cmd(char *cmd)
 
 	pid=fork();
 	if(pid == 0) {
-		system(cmd);
+		if (system(cmd) == -1) {
+			fprintf(stderr, "%s failed\n", cmd);
+			exit(1);
+		}
 		exit(0);
 	}
 
@@ -675,7 +678,6 @@ void getifnames(void)
 		exit(1);
 	}
 
-	fgets(buf, sizeof(buf),f);
 	while(fgets(buf, sizeof(buf), f)) {
 		p1=buf;
 		while(*p1 == ' ') p1++;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmifinfo.git



More information about the Pkg-wmaker-commits mailing list