From nobody Tue Dec 21 18:01:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E673190575F; Tue, 21 Dec 2021 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JJPRL61pSz4k13; Tue, 21 Dec 2021 18:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE5DC6794; Tue, 21 Dec 2021 18:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BLI1oTn086515; Tue, 21 Dec 2021 18:01:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BLI1oDI086514; Tue, 21 Dec 2021 18:01:50 GMT (envelope-from git) Date: Tue, 21 Dec 2021 18:01:50 GMT Message-Id: <202112211801.1BLI1oDI086514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: a2c51da6581d - main - tzcode: fix tz change detection logic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2c51da6581dbc38c60c9fc41d1b624ff2c8de97 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640109710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v3pM+/CIIe4lAkSsxfCIl2MhcHmwK5zk3/ZsZxw8ero=; b=XilqicImoZkYefAy0gaTxjvuRVY3fjc59rHB/fnhviXlUEJxCbqxLDwxFXhF4et/e/K5o0 d8HmZzoZSKf4mNVCkOQERUsFmd1O2T77wkNhEI7A+QS1m4tbbmrKmos4Uz8tR0DVNl0R2V 8Q3pcgr54dIMrAW/IRWBQdbwOdI5IFU3vBBeFOv/NdbJQqMbURj5lVMaIWYUAUF84KYrer HFxsOfkcqZb8x/ZN68io7AMHD97FymCmXA/0ngbz0YniyhjdGDiXahe1CBT7dFeZ8oM2GV tXhl/0zH/WjAEwdY/O+kOUboaLS9O7nBpTZdkErQlrRL7cN08if+ZWqVxVwNTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640109710; a=rsa-sha256; cv=none; b=xFrfZ/ceX7n6b9/Pyz4C1ejIdMXR8KyIEOed1x0Z38DeqCK/Dsn2vnmGgJzWDKStWjonXE u8xiITRcunZlXb2mosNO6mQOROyRB9bl5H0x0qDkVbNgbMXJ8ra0+RWtZdHm850RSOTLOl u5x+sRL/iMKZWQlyR+t8Jpuum1sqc3MCtHMiczHam6Ptpd/UkUtou8ManenFDfs0tfVM+e mGqGtXIEuWp60AqvL7pCKjfr8IQ79881CvoD5Ft7lmvh560u7DEJFMmgH4Uq45Rp7A/586 qh0Z1RZ7T5JiMycS3ZxgPKqOBqUQ7BeqS4w1H5weRlEU71ULvRN5d9EsvZ9WlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c51da6581dbc38c60c9fc41d1b624ff2c8de97 commit a2c51da6581dbc38c60c9fc41d1b624ff2c8de97 Author: Kyle Evans AuthorDate: 2021-12-16 02:15:38 +0000 Commit: Kyle Evans CommitDate: 2021-12-21 18:01:24 +0000 tzcode: fix tz change detection logic clock_gettime() returns 0 if it succeeds, so don't capture that into the fail logic. With this, WITH_DETECT_TZ_CHANGES successfully detects a change after 61 seconds. Reviewed by: imp, trasz Differential Revision: https://reviews.freebsd.org/D33494 --- contrib/tzcode/stdtime/localtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/tzcode/stdtime/localtime.c b/contrib/tzcode/stdtime/localtime.c index 9de1b26d74a0..6a0e0ce4fe4b 100644 --- a/contrib/tzcode/stdtime/localtime.c +++ b/contrib/tzcode/stdtime/localtime.c @@ -1278,7 +1278,7 @@ recheck_tzdata() * We want to recheck the timezone file every 61 sec. */ error = clock_gettime(CLOCK_MONOTONIC, &now); - if (error <= 0) { + if (error < 0) { /* XXX: Can we somehow report this? */ return 0; }