git: 6834c2660904 - stable/15 - adjtime(2): document that delta can be NULL

Kyle Evans <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a753958.3cc2d.3da83959__47316.1202784226$1786067361$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kevans:

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

commit 6834c2660904ef6d1fdade32e2dddda55778b989
Author:     Kyle Evans <[email protected]>
AuthorDate: 2026-06-20 13:55:26 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2026-08-06 23:35: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/libsys/adjtime.2 | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/libsys/adjtime.2 b/lib/libsys/adjtime.2
index ee8befe09ca9..ad2467d5ef61 100644
--- a/lib/libsys/adjtime.2
+++ b/lib/libsys/adjtime.2
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 13, 2021
+.Dd June 19, 2026
 .Dt ADJTIME 2
 .Os
 .Sh NAME
@@ -46,6 +46,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
@@ -55,6 +56,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.
@@ -65,7 +73,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.