Split clkoff initialization
This commit is contained in:
parent
b4d5e33d6c
commit
d6f9ed7125
@ -106,19 +106,23 @@ cindex(struct clkoff *table)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
clkoff_init(struct clkoff *table, FILE *file)
|
||||
void
|
||||
clkoff_init(struct clkoff *table)
|
||||
{
|
||||
memset(table, 0, sizeof(struct clkoff));
|
||||
}
|
||||
|
||||
int
|
||||
clkoff_load(struct clkoff *table, FILE *file)
|
||||
{
|
||||
if (cparse(table, file) != 0) {
|
||||
err("clkoff_init: failed parsing clock table\n");
|
||||
err("clkoff_load: failed parsing clock table\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Create index array */
|
||||
if (cindex(table) != 0) {
|
||||
err("clkoff_init: failed indexing table\n");
|
||||
err("clkoff_load: failed indexing table\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,8 @@ struct clkoff {
|
||||
struct clkoff_entry **index;
|
||||
};
|
||||
|
||||
int clkoff_init(struct clkoff *table, FILE *file);
|
||||
void clkoff_init(struct clkoff *table);
|
||||
int clkoff_load(struct clkoff *table, FILE *file);
|
||||
int clkoff_count(struct clkoff *table);
|
||||
struct clkoff_entry *clkoff_get(struct clkoff *table, int i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user