From owner-svn-src-all@freebsd.org Thu Aug 13 14:43:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1349F9A0246; Thu, 13 Aug 2015 14:43:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04B88117; Thu, 13 Aug 2015 14:43:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7DEhQqJ070819; Thu, 13 Aug 2015 14:43:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7DEhQGs070817; Thu, 13 Aug 2015 14:43:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201508131443.t7DEhQGs070817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 13 Aug 2015 14:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286724 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2015 14:43:27 -0000 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; /*