git: f08af2491ffd - stable/14 - adjtime(2): document that delta can be NULL

Kyle Evans <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/14 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=f08af2491ffd603f571b2cd5c7f1fe0cab603a10

commit f08af2491ffd603f571b2cd5c7f1fe0cab603a10
Author:     Kyle Evans <[email protected]>
AuthorDate: 2026-06-20 13:55:26 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2026-08-06 22:52:25 +0000

    adjtime(2): document that delta can be NULL
    
    The current verbiage somewhat indicates that always adjusts the time,
    which hasn't been true as far back as I had the energy to `git blame`.
    
    Reviewed by:    imp
    
    (cherry picked from commit 8ed580b1d3811e73e25db3d8a9fd235156c65387)
---
 lib/libc/sys/adjtime.2 | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2
index e1957ace66b6..02123e9c4ef0 100644
--- a/lib/libc/sys/adjtime.2
+++ b/lib/libc/sys/adjtime.2
@@ -27,7 +27,7 @@
 .\"
 .\"     @(#)adjtime.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd May 13, 2021
+.Dd June 19, 2026
 .Dt ADJTIME 2
 .Os
 .Sh NAME
@@ -48,6 +48,7 @@ makes small adjustments to the system time, as returned by
 advancing or retarding it
 by the time specified by the timeval
 .Fa delta .
+.Pp
 If
 .Fa delta
 is negative, the clock is
@@ -57,6 +58,13 @@ If
 .Fa delta
 is positive, a larger increment than normal
 is used.
+.Fa delta
+may also be a
+.Dv NULL
+pointer to fetch
+.Fa olddelta
+without making any adjustment.
+.Pp
 The skew used to perform the correction is generally a fraction of one percent.
 Thus, the time is always
 a monotonically increasing function.
@@ -67,7 +75,9 @@ may not be finished when
 is called again.
 If
 .Fa olddelta
-is not a null pointer,
+is not a
+.Dv NULL
+pointer,
 the structure pointed to will contain, upon return, the
 number of microseconds still to be corrected
 from the earlier call.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.