]> git.saurik.com Git - wxWidgets.git/commitdiff
correction to last commit: don't test unsetenv() return value, it's void under Darwin
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Aug 2007 22:39:29 +0000 (22:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Aug 2007 22:39:29 +0000 (22:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/utilsunx.cpp

index dffddb191ade62915cae4d77f104f6987e65054d..83f91955036a09623c30b7668480b7fc28541ce4 100644 (file)
@@ -1101,7 +1101,10 @@ static bool wxDoSetEnv(const wxString& variable, const char *value)
     if ( !value )
     {
 #ifdef HAVE_UNSETENV
-        return unsetenv(variable.mb_str()) == 0;
+        // don't test unsetenv() return value: it's void on some systems (at
+        // least Darwin)
+        unsetenv(variable.mb_str());
+        return;
 #else
         value = ""; // we can't pass NULL to setenv()
 #endif