summaryrefslogtreecommitdiff
path: root/sal/osl/all
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:21:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:35 +0100
commit26f05d59bc1c25b8a0d19be7f4738fd12e557001 (patch)
tree560cccfaacf4b63385aa52ac4b3912248e87cbef /sal/osl/all
parent5bbdb9423e15b68438bb8397c15635e044129e28 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
Diffstat (limited to 'sal/osl/all')
-rw-r--r--sal/osl/all/debugbase.cxx2
-rw-r--r--sal/osl/all/filepath.cxx4
-rw-r--r--sal/osl/all/loadmodulerelative.cxx4
-rw-r--r--sal/osl/all/log.cxx10
4 files changed, 10 insertions, 10 deletions
diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx
index 0f233f8b637b..c0f0a63c0ccf 100644
--- a/sal/osl/all/debugbase.cxx
+++ b/sal/osl/all/debugbase.cxx
@@ -35,7 +35,7 @@ struct StaticDebugBaseAddressFilter
: rtl::StaticWithInit<OStringVec, StaticDebugBaseAddressFilter> {
OStringVec operator()() const {
OStringVec vec;
- rtl_uString * pStr = 0;
+ rtl_uString * pStr = nullptr;
rtl::OUString const name(
"OSL_DEBUGBASE_STORE_ADDRESSES" );
if (osl_getEnvironment( name.pData, &pStr ) == osl_Process_E_None) {
diff --git a/sal/osl/all/filepath.cxx b/sal/osl/all/filepath.cxx
index 5390c9af8c35..c6d12caf11f5 100644
--- a/sal/osl/all/filepath.cxx
+++ b/sal/osl/all/filepath.cxx
@@ -28,8 +28,8 @@ static sal_uInt32 SAL_CALL osl_defCalcTextWidth( rtl_uString *ustrText )
oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString *ustrSystemPath, rtl_uString **pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pfnCalcWidth )
{
oslFileError error = osl_File_E_None;
- rtl_uString *ustrPath = NULL;
- rtl_uString *ustrFile = NULL;
+ rtl_uString *ustrPath = nullptr;
+ rtl_uString *ustrFile = nullptr;
sal_uInt32 uPathWidth, uFileWidth;
if ( !pfnCalcWidth )
diff --git a/sal/osl/all/loadmodulerelative.cxx b/sal/osl/all/loadmodulerelative.cxx
index a3dc71efe50b..ef3df35edc66 100644
--- a/sal/osl/all/loadmodulerelative.cxx
+++ b/sal/osl/all/loadmodulerelative.cxx
@@ -41,7 +41,7 @@ oslModule SAL_CALL osl_loadModuleRelative(
rtl::OUString base;
if (!osl::Module::getUrlFromAddress(baseModule, base)) {
SAL_INFO("sal.osl","osl::Module::getUrlFromAddress failed");
- return NULL;
+ return nullptr;
}
rtl::OUString abs;
try {
@@ -51,7 +51,7 @@ oslModule SAL_CALL osl_loadModuleRelative(
SAL_INFO("sal.osl",
"rtl::MalformedUriException <" << e.getMessage() << ">");
//TODO: let some OSL_TRACE variant take care of text conversion?
- return NULL;
+ return nullptr;
}
return osl_loadModule(abs.pData, mode);
}
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 58e24a2d4787..994169aa58b0 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -88,11 +88,11 @@ char const * getEnvironmentVariable() {
char const * getEnvironmentVariable_() {
char const * p1 = std::getenv("SAL_LOG");
- if (p1 == 0) {
- return 0;
+ if (p1 == nullptr) {
+ return nullptr;
}
char const * p2 = strdup(p1); // leaked
- if (p2 == 0) {
+ if (p2 == nullptr) {
std::abort(); // cannot do much here
}
return p2;
@@ -108,9 +108,9 @@ char const * getEnvironmentVariable() {
bool report(sal_detail_LogLevel level, char const * area) {
if (level == SAL_DETAIL_LOG_LEVEL_DEBUG)
return true;
- assert(area != 0);
+ assert(area != nullptr);
char const * env = getEnvironmentVariable();
- if (env == 0) {
+ if (env == nullptr) {
env = "+WARN";
}
std::size_t areaLen = std::strlen(area);