public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] sys/time.h: Remove KASSERT
Date: Tue, 04 Dec 2018 09:03:00 -0000	[thread overview]
Message-ID: <20181204090340.127998.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=55db4a8e3ae0aef3a3530a82515d8ba5d2ea121c

commit 55db4a8e3ae0aef3a3530a82515d8ba5d2ea121c
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Tue Dec 4 07:34:25 2018 +0100

    sys/time.h: Remove KASSERT
    
    The KASSERT is only used by the FreeBSD kernel.
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/include/sys/time.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h
index 081e0cf..c760adf 100644
--- a/newlib/libc/include/sys/time.h
+++ b/newlib/libc/include/sys/time.h
@@ -187,9 +187,6 @@ sbttobt(sbintime_t _sbt)
  * evil of ull rather than a uint64_t cast to ensure we have well defined
  * right shift semantics. With these changes, we get all the ns, us and ms
  * conversions back and forth right.
- * Note: This file is used for both kernel and userland includes, so we can't
- * rely on KASSERT being defined, nor can we pollute the namespace by including
- * assert.h.
  */
 static __inline int64_t
 sbttons(sbintime_t _sbt)
@@ -203,9 +200,6 @@ nstosbt(int64_t _ns)
 {
 	sbintime_t sb = 0;
 
-#ifdef KASSERT
-	KASSERT(_ns >= 0, ("Negative values illegal for nstosbt: %jd", _ns));
-#endif
 	if (_ns >= SBT_1S) {
 		sb = (_ns / 1000000000) * SBT_1S;
 		_ns = _ns % 1000000000;
@@ -227,9 +221,6 @@ ustosbt(int64_t _us)
 {
 	sbintime_t sb = 0;
 
-#ifdef KASSERT
-	KASSERT(_us >= 0, ("Negative values illegal for ustosbt: %jd", _us));
-#endif
 	if (_us >= SBT_1S) {
 		sb = (_us / 1000000) * SBT_1S;
 		_us = _us % 1000000;
@@ -251,9 +242,6 @@ mstosbt(int64_t _ms)
 {
 	sbintime_t sb = 0;
 
-#ifdef KASSERT
-	KASSERT(_ms >= 0, ("Negative values illegal for mstosbt: %jd", _ms));
-#endif
 	if (_ms >= SBT_1S) {
 		sb = (_ms / 1000) * SBT_1S;
 		_ms = _ms % 1000;


                 reply	other threads:[~2018-12-04  9:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181204090340.127998.qmail@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).