From 556373c41fddbac6cbee1c89e7707631270a1852 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 11 Mar 2015 09:06:08 +0000 Subject: V668 no sense in testing the result of new against null Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39 --- pyuno/zipcore/python.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pyuno') diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx index 0e8bb6c6ff0b..6944d932c666 100644 --- a/pyuno/zipcore/python.cxx +++ b/pyuno/zipcore/python.cxx @@ -144,9 +144,6 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { MY_LENGTH(L"\""); //TODO: overflow } wchar_t * cl = new wchar_t[clSize]; - if (cl == NULL) { - exit(EXIT_FAILURE); - } wchar_t * cp = encode(cl, pythonhome); for (int i = 1; i < argc; ++i) { *cp++ = L' '; @@ -171,8 +168,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { orig = (wchar_t *)L""; } else { orig = new wchar_t[n]; - if (orig == NULL || - GetEnvironmentVariableW(L"PATH", orig, n) != n - 1) + if (GetEnvironmentVariableW(L"PATH", orig, n) != n - 1) { exit(EXIT_FAILURE); } @@ -198,8 +194,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { orig = (wchar_t *)L""; } else { orig = new wchar_t[n]; - if (orig == NULL || - GetEnvironmentVariableW(L"PYTHONPATH", orig, n) != n - 1) + if (GetEnvironmentVariableW(L"PYTHONPATH", orig, n) != n - 1) { exit(EXIT_FAILURE); } -- cgit v1.2.3