Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2017 07:29:02 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r313138 - projects/hps_head/sys/kern
Message-ID:  <201702030729.v137T2xh042505@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Feb  3 07:29:02 2017
New Revision: 313138
URL: https://svnweb.freebsd.org/changeset/base/313138

Log:
  Fix build with KTR enabled.
  
  Found by:	markj @

Modified:
  projects/hps_head/sys/kern/kern_timeout.c

Modified: projects/hps_head/sys/kern/kern_timeout.c
==============================================================================
--- projects/hps_head/sys/kern/kern_timeout.c	Fri Feb  3 06:04:06 2017	(r313137)
+++ projects/hps_head/sys/kern/kern_timeout.c	Fri Feb  3 07:29:02 2017	(r313138)
@@ -1015,16 +1015,14 @@ callout_handle_init(struct callout_handl
 static const char *
 callout_retvalstring(callout_ret_t retval)
 {
-	switch (retval.value) {
-	case CALLOUT_RET_DRAINING:
+	if (retval.value == CALLOUT_RET_DRAINING)
 		return ("callout cannot be stopped and needs drain");
-	case CALLOUT_RET_CANCELLED:
+	else if (retval.value == CALLOUT_RET_CANCELLED)
 		return ("callout was successfully stopped");
-	case CALLOUT_RET_CANCELLED_AND_DRAINING:
+	else if (retval.value == CALLOUT_RET_CANCELLED_AND_DRAINING)
 		return ("callout was successfully stopped while being serviced");
-	default:
+	else
 		return ("callout was already stopped");
-	}
 }
 #endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702030729.v137T2xh042505>