From 9feea2ecc59c6daa42dece6c30cf33f5e7df7561 Mon Sep 17 00:00:00 2001 From: umutbayramoglu Date: Mon, 7 Dec 2020 20:37:42 +0000 Subject: [PATCH] tdf#96505 : Get rid of cargo cult long integer literals Change-Id: I7b269fb5bafceba071ebe649a696ef61301c4018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann Reviewed-by: Tor Lillqvist --- bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c | 2 +- bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c | 2 +- embeddedobj/test/Container1/nativelib/nativeview.c | 2 +- .../OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c | 4 ++-- .../DesktopEnvironment/nativelib/windows/nativeview.c | 4 ++-- svl/unx/source/svdde/ddedummy.cxx | 4 ++-- tools/source/stream/strmunx.cxx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c index f908d8f63c90..9e534e2262d9 100644 --- a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c +++ b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c @@ -103,7 +103,7 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindo /* Get the drawing surface */ ds = awt.GetDrawingSurface(env, obj_this); if (ds == NULL) - return 0L; + return 0; /* Lock the drawing surface */ lock = ds->Lock(ds); diff --git a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c index 5d1bdb0f5cc8..7f29160250e6 100644 --- a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c +++ b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c @@ -97,7 +97,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNative /* Get the drawing surface */ if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL) - return 0L; + return 0; /* Lock the drawing surface */ lock = ds->Lock(ds); diff --git a/embeddedobj/test/Container1/nativelib/nativeview.c b/embeddedobj/test/Container1/nativelib/nativeview.c index 9d0f478bd410..a58ce54ef587 100644 --- a/embeddedobj/test/Container1/nativelib/nativeview.c +++ b/embeddedobj/test/Container1/nativelib/nativeview.c @@ -87,7 +87,7 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow /* Get the drawing surface */ if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL) - return 0L; + return 0; /* Lock the drawing surface */ lock = ds->Lock(ds); diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c index 7f4bc1472d58..5343f85e9674 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c @@ -41,7 +41,7 @@ #include "jawt_md.h" #include "nativeview.h" -#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,S); return 0L;} +#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,S); return 0;} #define SYSTEM_WIN32 1 #define SYSTEM_WIN16 2 @@ -86,7 +86,7 @@ JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow /* Get the drawing surface */ if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL) - return 0L; + return 0; /* Lock the drawing surface */ lock = ds->Lock(ds); diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c index b7b13d6c640d..f7bef492022c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c @@ -39,7 +39,7 @@ #include "jawt_md.h" #include "NativeView.h" -#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,"%s\n",S); return 0L;} +#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,"%s\n",S); return 0;} #define SYSTEM_WIN32 1 #define SYSTEM_WIN16 2 @@ -93,7 +93,7 @@ JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow /* Get the drawing surface */ if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL) - return 0L; + return 0; /* Lock the drawing surface */ lock = ds->Lock(ds); diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 98942d410e05..03e423d47b3f 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -74,7 +74,7 @@ DdeData& DdeData::operator=(DdeData&&) noexcept tools::Long DdeData::getSize() const { - return 0L; + return 0; } void const * DdeData::getData() const @@ -86,7 +86,7 @@ struct DdeImp {}; tools::Long DdeConnection::GetError() const { - return 0L; + return 0; } DdeConnection::DdeConnection( SAL_UNUSED_PARAMETER const OUString&, SAL_UNUSED_PARAMETER const OUString& ) diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 249af86fc90f..40cbe382213a 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -275,7 +275,7 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos) if ( rc != osl_File_E_None ) { SetError( SVSTREAM_SEEK_ERROR ); - return 0L; + return 0; } if ( nPos != STREAM_SEEK_TO_END ) return nPos; @@ -283,7 +283,7 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos) return nNewPos; } SetError( SVSTREAM_GENERALERROR ); - return 0L; + return 0; } void SvFileStream::FlushData()