Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2015 14:43:26 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286724 - head/sys/sys
Message-ID:  <201508131443.t7DEhQGs070817@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Thu Aug 13 14:43:25 2015
New Revision: 286724
URL: https://svnweb.freebsd.org/changeset/base/286724

Log:
  Constify the pointers to eventtimer and timecounter name strings.
  
  The need for this appears as soon as you try to set the names to something
  that isn't a "quoted literal".  (I'm actually confused why quoted strings
  aren't a problem as well, we must have some warning disabled.)

Modified:
  head/sys/sys/timeet.h
  head/sys/sys/timetc.h

Modified: head/sys/sys/timeet.h
==============================================================================
--- head/sys/sys/timeet.h	Thu Aug 13 14:43:11 2015	(r286723)
+++ head/sys/sys/timeet.h	Thu Aug 13 14:43:25 2015	(r286724)
@@ -53,7 +53,7 @@ typedef int et_deregister_cb_t(struct ev
 struct eventtimer {
 	SLIST_ENTRY(eventtimer)	et_all;
 		/* Pointer to the next event timer. */
-	char			*et_name;
+	const char		*et_name;
 		/* Name of the event timer. */
 	int			et_flags;
 		/* Set of capabilities flags: */

Modified: head/sys/sys/timetc.h
==============================================================================
--- head/sys/sys/timetc.h	Thu Aug 13 14:43:11 2015	(r286723)
+++ head/sys/sys/timetc.h	Thu Aug 13 14:43:25 2015	(r286724)
@@ -49,7 +49,7 @@ struct timecounter {
 		/* This mask should mask off any unimplemented bits. */
 	uint64_t		tc_frequency;
 		/* Frequency of the counter in Hz. */
-	char			*tc_name;
+	const char		*tc_name;
 		/* Name of the timecounter. */
 	int			tc_quality;
 		/*



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