]> granicus.if.org Git - php/commitdiff
fix php_u_trim() and compile warnings
authorAntony Dovgal <tony2001@php.net>
Fri, 12 Aug 2005 16:46:38 +0000 (16:46 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 12 Aug 2005 16:46:38 +0000 (16:46 +0000)
ext/standard/string.c

index 96eedb6fc7542a24ae17f79a82648ed667b7e56a..1b9cff5398dedf136392332240c2ebd54e4c3bac 100644 (file)
@@ -718,12 +718,12 @@ static UChar *php_u_trim(UChar *c, int32_t len, UChar *what, int32_t what_len, z
                }
        } else { /* Trimmed the whole string */
                if ( return_value ) {
-                       RETURN_EMPTY_UNICODE();
+                       RETVAL_EMPTY_UNICODE();
                } else {
                        return (USTR_MAKE(""));
                }
        }
-
+       return (USTR_MAKE(""));
 }
 /* }}} */
 
@@ -1911,7 +1911,7 @@ PHP_FUNCTION(strstr)
                        case IS_UNICODE:
                                found_offset = (UChar*)found - (UChar*)haystack;
                                if (part) {
-                                       char *ret;
+                                       UChar *ret;
                                        ret = eumalloc(found_offset + 1);
                                        u_strncpy(ret, haystack, found_offset);
                                        ret[found_offset] = '\0';