[Libreoffice-commits] core.git: desktop/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 11 08:19:04 UTC 2018


 desktop/source/lib/lokandroid.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit e219d868fda704f58f6a980c29b8827cde87ea65
Author:     Zdibák Zoltán <zdibakzoltan at gmail.com>
AuthorDate: Sat Nov 10 22:09:50 2018 +0100
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Nov 11 09:18:41 2018 +0100

    cppCheck redundantAssignment variable pClone
    
    Change-Id: If2e1643a507f13e7da733896b1115ef39b512f00
    Reviewed-on: https://gerrit.libreoffice.org/63252
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index d22c2585eb68..e800c82b0706 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -38,10 +38,8 @@ T* getHandle(JNIEnv* pEnv, jobject aObject)
 
 const char* copyJavaString(JNIEnv* pEnv, jstring aJavaString)
 {
-    const char* pClone = NULL;
-
     const char* pTemp = pEnv->GetStringUTFChars(aJavaString, NULL);
-    pClone = strdup(pTemp);
+    const char* pClone = strdup(pTemp);
     pEnv->ReleaseStringUTFChars(aJavaString, pTemp);
 
     return pClone;


More information about the Libreoffice-commits mailing list