Kaydet (Commit) fe39041f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove unnecessary casts

Change-Id: Iafc7727a22d657dfb6bc97ed767907cce3679364
üst cd11bc69
...@@ -790,7 +790,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) ...@@ -790,7 +790,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he)
if (_osl_isFullQualifiedDomainName(he->h_name)) if (_osl_isFullQualifiedDomainName(he->h_name))
{ {
cn= (sal_Char *)strdup(he->h_name); cn= strdup(he->h_name);
OSL_ASSERT(cn); OSL_ASSERT(cn);
if (cn == NULL) if (cn == NULL)
return ((oslHostAddr)NULL); return ((oslHostAddr)NULL);
...@@ -887,7 +887,7 @@ oslHostAddr SAL_CALL osl_psz_createHostAddr ( ...@@ -887,7 +887,7 @@ oslHostAddr SAL_CALL osl_psz_createHostAddr (
if ((pszHostname == NULL) || (pAddr == NULL)) if ((pszHostname == NULL) || (pAddr == NULL))
return ((oslHostAddr)NULL); return ((oslHostAddr)NULL);
cn = (sal_Char *) strdup(pszHostname); cn = strdup(pszHostname);
OSL_ASSERT(cn); OSL_ASSERT(cn);
if (cn == NULL) if (cn == NULL)
return ((oslHostAddr)NULL); return ((oslHostAddr)NULL);
......
...@@ -711,7 +711,7 @@ namespace rtl_str ...@@ -711,7 +711,7 @@ namespace rtl_str
void trim_WithLength_001() void trim_WithLength_001()
{ {
char const *pStr = " trim this"; char const *pStr = " trim this";
sal_Char *pStr2 = (sal_Char*)strdup(pStr); sal_Char *pStr2 = strdup(pStr);
if (pStr2) if (pStr2)
{ {
rtl_str_trim_WithLength( pStr2, 2 ); rtl_str_trim_WithLength( pStr2, 2 );
...@@ -724,7 +724,7 @@ namespace rtl_str ...@@ -724,7 +724,7 @@ namespace rtl_str
void trim_WithLength_002() void trim_WithLength_002()
{ {
char const *pStr = "trim this"; char const *pStr = "trim this";
sal_Char *pStr2 = (sal_Char*)strdup(pStr); sal_Char *pStr2 = strdup(pStr);
if (pStr2) if (pStr2)
{ {
rtl_str_trim_WithLength( pStr2, 5 ); rtl_str_trim_WithLength( pStr2, 5 );
...@@ -737,7 +737,7 @@ namespace rtl_str ...@@ -737,7 +737,7 @@ namespace rtl_str
void trim_WithLength_003() void trim_WithLength_003()
{ {
char const *pStr = " trim this"; char const *pStr = " trim this";
sal_Char *pStr2 = (sal_Char*)strdup(pStr); sal_Char *pStr2 = strdup(pStr);
if (pStr2) if (pStr2)
{ {
strcpy(pStr2, pStr); strcpy(pStr2, pStr);
...@@ -751,7 +751,7 @@ namespace rtl_str ...@@ -751,7 +751,7 @@ namespace rtl_str
void trim_WithLength_004() void trim_WithLength_004()
{ {
char const *pStr = "\r\n\t \n\r trim \n this"; 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) if (pStr2)
{ {
rtl_str_trim_WithLength( pStr2, 17 ); rtl_str_trim_WithLength( pStr2, 17 );
...@@ -764,7 +764,7 @@ namespace rtl_str ...@@ -764,7 +764,7 @@ namespace rtl_str
void trim_WithLength_005() void trim_WithLength_005()
{ {
char const *pStr = "\r\n\t \n\r trim \t this \n\r\t\t "; 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) if (pStr2)
{ {
rtl_str_trim_WithLength( pStr2, strlen(pStr2) ); rtl_str_trim_WithLength( pStr2, strlen(pStr2) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment