r2402 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jan 30 10:50:27 CET 2008


Author: phk
Date: 2008-01-30 10:50:26 +0100 (Wed, 30 Jan 2008)
New Revision: 2402

Modified:
   trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
Check various return values (or not) to reduce Flexelint noise.


Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c	2008-01-29 16:05:54 UTC (rev 2401)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c	2008-01-30 09:50:26 UTC (rev 2402)
@@ -231,7 +231,7 @@
 DebugSigPass(int sig)
 {
 
-	kill(d_child, sig);
+	(void)kill(d_child, sig);
 }
 
 static void
@@ -280,8 +280,8 @@
 	pfd[1].fd = pipes[1][0];
 	pfd[1].events = POLLIN;
 
-	signal(SIGPIPE, SIG_IGN);
-	signal(SIGINT, DebugSigPass);
+	(void)signal(SIGPIPE, SIG_IGN);
+	(void)signal(SIGINT, DebugSigPass);
 	i = read(pipes[1][0], buf, sizeof buf - 1);
 	xxxassert(i >= 0);
 	buf[i] = '\0';
@@ -376,7 +376,7 @@
 	setbuf(stdout, NULL);
 	setbuf(stderr, NULL);
 
-	setenv("TZ", "GMT", 1);
+	AZ(setenv("TZ", "GMT", 1));
 	tzset();
 
 	memset(cli, 0, sizeof cli);
@@ -547,18 +547,18 @@
 	if (d_flag == 1)
 		DebugStunt();
 	if (d_flag < 2 && !F_flag)
-		daemon(1, d_flag);
+		AZ(daemon(1, d_flag));
 	if (d_flag == 1)
 		printf("%d\n", getpid());
 
 	if (pfh != NULL)
-		vpf_write(pfh);
+		vpf_write(pfh);		/* XXX: Warn or Err if fail ? */
 
 	mgt_cli_init();
 
 	mgt_run(d_flag, T_arg);
 
 	if (pfh != NULL)
-		vpf_remove(pfh);
+		(void)vpf_remove(pfh);
 	exit(0);
 }




More information about the varnish-commit mailing list