[Libreoffice-commits] core.git: sal/osl sal/qa

Stephan Bergmann sbergman at redhat.com
Tue May 20 01:03:51 PDT 2014


 sal/osl/unx/socket.c           |    4 ++--
 sal/qa/rtl/ostring/rtl_str.cxx |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit fe39041f98b1abb3a23b43f399963487fe5b66b9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 20 10:03:18 2014 +0200

    Remove unnecessary casts
    
    Change-Id: Iafc7727a22d657dfb6bc97ed767907cce3679364

diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 052ace9..d11297f 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -790,7 +790,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he)
 
     if (_osl_isFullQualifiedDomainName(he->h_name))
     {
-        cn= (sal_Char *)strdup(he->h_name);
+        cn= strdup(he->h_name);
         OSL_ASSERT(cn);
         if (cn == NULL)
             return ((oslHostAddr)NULL);
@@ -887,7 +887,7 @@ oslHostAddr SAL_CALL osl_psz_createHostAddr (
     if ((pszHostname == NULL) || (pAddr == NULL))
         return ((oslHostAddr)NULL);
 
-    cn = (sal_Char *) strdup(pszHostname);
+    cn = strdup(pszHostname);
     OSL_ASSERT(cn);
     if (cn == NULL)
         return ((oslHostAddr)NULL);
diff --git a/sal/qa/rtl/ostring/rtl_str.cxx b/sal/qa/rtl/ostring/rtl_str.cxx
index 759d30e..4ba2962 100644
--- a/sal/qa/rtl/ostring/rtl_str.cxx
+++ b/sal/qa/rtl/ostring/rtl_str.cxx
@@ -711,7 +711,7 @@ namespace rtl_str
         void trim_WithLength_001()
         {
             char const *pStr = "  trim this";
-            sal_Char *pStr2 = (sal_Char*)strdup(pStr);
+            sal_Char *pStr2 = strdup(pStr);
             if (pStr2)
             {
                 rtl_str_trim_WithLength( pStr2, 2 );
@@ -724,7 +724,7 @@ namespace rtl_str
         void trim_WithLength_002()
         {
             char const *pStr = "trim this";
-            sal_Char *pStr2 = (sal_Char*)strdup(pStr);
+            sal_Char *pStr2 = strdup(pStr);
             if (pStr2)
             {
                 rtl_str_trim_WithLength( pStr2, 5 );
@@ -737,7 +737,7 @@ namespace rtl_str
         void trim_WithLength_003()
         {
             char const *pStr = "     trim   this";
-            sal_Char *pStr2 = (sal_Char*)strdup(pStr);
+            sal_Char *pStr2 = strdup(pStr);
             if (pStr2)
             {
                 strcpy(pStr2, pStr);
@@ -751,7 +751,7 @@ namespace rtl_str
         void trim_WithLength_004()
         {
             char const *pStr = "\r\n\t \n\r    trim  \n this";
-            sal_Char *pStr2 = (sal_Char*)strdup(pStr);
+            sal_Char *pStr2 = strdup(pStr);
             if (pStr2)
             {
                 rtl_str_trim_WithLength( pStr2, 17 );
@@ -764,7 +764,7 @@ namespace rtl_str
         void trim_WithLength_005()
         {
             char const *pStr = "\r\n\t \n\r    trim \t this \n\r\t\t     ";
-            sal_Char *pStr2 = (sal_Char*)strdup(pStr);
+            sal_Char *pStr2 = strdup(pStr);
             if (pStr2)
             {
                 rtl_str_trim_WithLength( pStr2, strlen(pStr2) );


More information about the Libreoffice-commits mailing list