mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 08:28:42 +00:00
shared.c: initialize cgit_repo structs properly
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
2273c2c821
commit
42e7a169e8
1
shared.c
1
shared.c
@ -48,6 +48,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = &cgit_repolist.repos[cgit_repolist.count-1];
|
ret = &cgit_repolist.repos[cgit_repolist.count-1];
|
||||||
|
memset(ret, 0, sizeof(struct cgit_repo));
|
||||||
ret->url = trim_end(url, '/');
|
ret->url = trim_end(url, '/');
|
||||||
ret->name = ret->url;
|
ret->name = ret->url;
|
||||||
ret->path = NULL;
|
ret->path = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user