summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-20 10:03:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-20 10:03:18 +0200
commitfe39041f98b1abb3a23b43f399963487fe5b66b9 (patch)
treec4f82400d45abfefec75600726daa635bf4d8247 /sal
parentcd11bc699ac50af4f560ed5f2e5e7903de0898b8 (diff)
Remove unnecessary casts
Change-Id: Iafc7727a22d657dfb6bc97ed767907cce3679364
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/socket.c4
-rw-r--r--sal/qa/rtl/ostring/rtl_str.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 052ace914c1b..d11297f6268b 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 759d30e9836a..4ba29626efed 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) );