From: Mikko Rasa Date: Mon, 30 May 2011 21:10:06 +0000 (+0300) Subject: Fix incorrect return value check in get_local_timezone X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d424f658ddb2861ed31f607ed17ee0d420d4b4cd;p=libs%2Fcore.git Fix incorrect return value check in get_local_timezone --- 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));