From d424f658ddb2861ed31f607ed17ee0d420d4b4cd Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 31 May 2011 00:10:06 +0300 Subject: [PATCH] Fix incorrect return value check in get_local_timezone --- source/time/timezone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/time/timezone.cpp b/source/time/timezone.cpp index 0ec9d2b..17d6bad 100644 --- a/source/time/timezone.cpp +++ b/source/time/timezone.cpp @@ -51,7 +51,7 @@ TimeZone get_local_timezone() return TimeZone(offset); #else int fd = open("/etc/localtime", O_RDONLY); - if(fd>=-1) + if(fd!=-1) { char hdr[44]; int len = read(fd, hdr, sizeof(hdr)); -- 2.43.0