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

git pushed a commit to branch main
in repository eternity.

View the commit online.

commit 78c357c0107c6af2af881a8ff98859b6b3909389
Author: Alastair Poole <[email protected]>
AuthorDate: Sun Nov 22 10:45:33 2026 +0000

    world: small fix
---
 src/lib/eternity_world.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/lib/eternity_world.c b/src/lib/eternity_world.c
index b2f0e24..a71568f 100644
--- a/src/lib/eternity_world.c
+++ b/src/lib/eternity_world.c
@@ -79,13 +79,15 @@ eternity_world_location_get(const char *zone, double *latitude, double *longitud
 
    if (!strcmp(zone, "local"))
       {
+         char *resolved;
          tz = getenv("TZ");
+
+         resolved = eternity_realpath("/etc/localtime");
+
          if (tz && tz[0]) zone = tz[0] == ':' ? tz + 1 : tz;
-         else
+         else if (resolved)
            {
-              char *resolved;
-              resolved = eternity_realpath("/etc/localtime");
-              if (resolved && strstr(resolved, "/zoneinfo/"))
+              if (strstr(resolved, "/zoneinfo/"))
                  zone = strstr(resolved, "/zoneinfo/") + strlen("/zoneinfo/");
               free(resolved);
            }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to