mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-29 20:53:55 +02:00
eeshow/gui.c (add_hist): avoid excessive use of "(*anchor)"
This commit is contained in:
parent
971ba27131
commit
4a2177e041
17
eeshow/gui.c
17
eeshow/gui.c
@ -1004,7 +1004,7 @@ static void add_hist(void *user, struct hist *h)
|
|||||||
{
|
{
|
||||||
struct add_hist_ctx *ahc = user;
|
struct add_hist_ctx *ahc = user;
|
||||||
struct gui_ctx *ctx = ahc->ctx;
|
struct gui_ctx *ctx = ahc->ctx;
|
||||||
struct gui_hist **anchor;
|
struct gui_hist **anchor, *hist;
|
||||||
const struct sheet *sch;
|
const struct sheet *sch;
|
||||||
unsigned age = 0;
|
unsigned age = 0;
|
||||||
|
|
||||||
@ -1014,13 +1014,16 @@ static void add_hist(void *user, struct hist *h)
|
|||||||
|
|
||||||
for (anchor = &ctx->hist; *anchor; anchor = &(*anchor)->next)
|
for (anchor = &ctx->hist; *anchor; anchor = &(*anchor)->next)
|
||||||
age++;
|
age++;
|
||||||
*anchor = alloc_type(struct gui_hist);
|
|
||||||
(*anchor)->ctx = ctx;
|
hist = alloc_type(struct gui_hist);
|
||||||
(*anchor)->vcs_hist = h;
|
hist->ctx = ctx;
|
||||||
|
hist->vcs_hist = h;
|
||||||
sch = parse_sheets(h, ahc->n_args, ahc->args, ahc->recurse);
|
sch = parse_sheets(h, ahc->n_args, ahc->args, ahc->recurse);
|
||||||
(*anchor)->sheets = sch ? get_sheets(ctx, sch) : NULL;
|
hist->sheets = sch ? get_sheets(ctx, sch) : NULL;
|
||||||
(*anchor)->age = age;
|
hist->age = age;
|
||||||
(*anchor)->next = NULL;
|
|
||||||
|
hist->next = NULL;
|
||||||
|
*anchor = hist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user