[experimental-ims] 5cfe903 Combine two small functions

Geoff Simmons geoff at varnish-cache.org
Mon Jan 9 21:52:39 CET 2012


commit 5cfe903c15a76c3b98fb1c42e8c862a5553286c2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Nov 15 19:52:36 2011 +0000

    Combine two small functions

diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index a2c0b58..7e60c1a 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -424,21 +424,14 @@ mgt_stop_child(void)
 /*--------------------------------------------------------------------*/
 
 static void
-mgt_report_panic(pid_t r)
+mgt_handle_panicstr(pid_t r)
 {
+	char time_str[30];
 
 	if (VSM_head->panicstr[0] == '\0')
 		return;
 	REPORT(LOG_ERR, "Child (%jd) Panic message: %s",
 	    (intmax_t)r, VSM_head->panicstr);
-}
-
-static void
-mgt_save_panic(void)
-{
-	char time_str[30];
-	if (VSM_head->panicstr[0] == '\0')
-		return;
 
 	if (child_panic)
 		VSB_delete(child_panic);
@@ -500,8 +493,7 @@ mgt_sigchld(const struct vev *e, int what)
 	REPORT(LOG_INFO, "%s", VSB_data(vsb));
 	VSB_delete(vsb);
 
-	mgt_report_panic(r);
-	mgt_save_panic();
+	mgt_handle_panicstr(r);
 
 	child_pid = -1;
 



More information about the varnish-commit mailing list