]> granicus.if.org Git - icinga2/commitdiff
Improve compatibility with Windows.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 9 Dec 2013 12:46:53 +0000 (13:46 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 9 Dec 2013 12:46:53 +0000 (13:46 +0100)
Fixes #5287

lib/base/utility.cpp

index 6e8bdd1f3ffdac347003bfdabc79c1204ff74e50..9ae1af45946a57371ee35ad1ae5d8fa257a89f96 100644 (file)
@@ -750,7 +750,7 @@ tm Utility::LocalTime(time_t ts)
 #ifdef _MSC_VER
        tm *result = localtime(&ts);
 
-       if (temp == NULL) {
+       if (result == NULL) {
                BOOST_THROW_EXCEPTION(posix_error()
                    << boost::errinfo_api_function("localtime")
                    << boost::errinfo_errno(errno));
@@ -768,4 +768,4 @@ tm Utility::LocalTime(time_t ts)
 
        return result;
 #endif /* _MSC_VER */
-}
\ No newline at end of file
+}