[openssh-commits] [openssh] 02/02: upstream: annotate tm_wday = -1 with /* sentinel for error */ per

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 23 14:32:09 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit b88165a06c8e195f267909de002450245e60002e
Author: tb at openbsd.org <tb at openbsd.org>
AuthorDate: Sun Jun 21 19:23:56 2026 +0000

    upstream: annotate tm_wday = -1 with /* sentinel for error */ per
    
    timegm(3) manpage
    
    suggested by deraadt
    
    OpenBSD-Commit-ID: 2fa92f0b826f0ab9e5d1cb0b2243b8e2f80951b2
---
 misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc.c b/misc.c
index d9fd49dfa..517fa7a97 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.214 2026/05/27 13:54:15 tb Exp $ */
+/* $OpenBSD: misc.c,v 1.215 2026/06/21 19:23:56 tb Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2005-2020 Damien Miller.  All rights reserved.
@@ -2588,11 +2588,11 @@ parse_absolute_time(const char *s, uint64_t *tp)
 	if ((cp = strptime(buf, fmt, &tm)) == NULL || *cp != '\0')
 		return SSH_ERR_INVALID_FORMAT;
 	if (is_utc) {
-		tm.tm_wday = -1;
+		tm.tm_wday = -1;	/* sentinel for error */
 		if ((tt = timegm(&tm)) == -1 && tm.tm_wday == -1)
 			return SSH_ERR_INVALID_FORMAT;
 	} else {
-		tm.tm_wday = -1;
+		tm.tm_wday = -1;	/* sentinel for error */
 		if ((tt = mktime(&tm)) == -1 && tm.tm_wday == -1)
 			return SSH_ERR_INVALID_FORMAT;
 	}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list