mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
- Cosmetic changes
This commit is contained in:
parent
3853f5b370
commit
2e3723f08f
1 changed files with 8 additions and 8 deletions
|
@ -123,20 +123,20 @@ char *phpdbg_trim(const char *str, size_t len, size_t *new_len) /* {{{ */
|
||||||
--len;
|
--len;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*p && isspace(*(p + len-1))) {
|
while (*p && isspace(*(p + len -1))) {
|
||||||
--len;
|
--len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
|
new = estrndup("", sizeof(""));
|
||||||
*new_len = 0;
|
*new_len = 0;
|
||||||
return estrndup("", sizeof(""));
|
} else {
|
||||||
}
|
new = estrndup(p, len);
|
||||||
|
*(new + len) = '\0';
|
||||||
|
|
||||||
new = estrndup(p, len);
|
if (new_len) {
|
||||||
*(new + len) = '\0';
|
*new_len = len;
|
||||||
|
}
|
||||||
if (new_len) {
|
|
||||||
*new_len = len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue