]> git.tdb.fi Git - libs/core.git/commitdiff
Fix incorrect return value check in get_local_timezone
authorMikko Rasa <tdb@tdb.fi>
Mon, 30 May 2011 21:10:06 +0000 (00:10 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 30 May 2011 21:14:51 +0000 (00:14 +0300)
source/time/timezone.cpp

index 0ec9d2b8e4137300f3139bfb2f5661e7fe3a0764..17d6bad846b981d31e663c1099d7ed81c18fab19 100644 (file)
@@ -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));