mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
work around gcc bug
This commit is contained in:
parent
9d938732d0
commit
afe488d4bc
@ -535,7 +535,9 @@ static void parse_url(char *src_url, struct host_info *h)
|
|||||||
p = strchr(h->host, '?'); if (!sp || (p && sp > p)) sp = p;
|
p = strchr(h->host, '?'); if (!sp || (p && sp > p)) sp = p;
|
||||||
p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p;
|
p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p;
|
||||||
if (!sp) {
|
if (!sp) {
|
||||||
h->path = "";
|
/* gcc 4.1.1 bug: h->path = "" puts "" in rodata! */
|
||||||
|
static char nullstr[] = "";
|
||||||
|
h->path = nullstr;
|
||||||
} else if (*sp == '/') {
|
} else if (*sp == '/') {
|
||||||
*sp = '\0';
|
*sp = '\0';
|
||||||
h->path = sp + 1;
|
h->path = sp + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user