mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 05:31:53 +02:00
b2/db.c (part_add): fix jumbled initialization mess
This commit is contained in:
parent
c92ba6f21a
commit
e7b2e65795
4
b2/db.c
4
b2/db.c
@ -55,6 +55,8 @@ struct part *part_add(const char *domain, const char *name)
|
|||||||
struct part part = {
|
struct part part = {
|
||||||
.domain = domain,
|
.domain = domain,
|
||||||
.name = name,
|
.name = name,
|
||||||
|
.param = NULL,
|
||||||
|
.stock = NULL,
|
||||||
};
|
};
|
||||||
struct part *p;
|
struct part *p;
|
||||||
|
|
||||||
@ -63,7 +65,7 @@ struct part *part_add(const char *domain, const char *name)
|
|||||||
p = g_tree_lookup(tree, &part);
|
p = g_tree_lookup(tree, &part);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
p = alloc_type(struct part);
|
p = alloc_type(struct part);
|
||||||
p->stock = NULL;
|
*p = part;
|
||||||
p->next = p->prev = p;
|
p->next = p->prev = p;
|
||||||
g_tree_insert(tree, p, p);
|
g_tree_insert(tree, p, p);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user