Merge pull request #29989 from yuwata/conf-parser-arg-type
conf-parser: fix argument type
This commit is contained in:
@@ -51,15 +51,13 @@ int config_item_table_lookup(
|
||||
void **ret_data,
|
||||
void *userdata) {
|
||||
|
||||
const ConfigTableItem *t;
|
||||
|
||||
assert(table);
|
||||
assert(lvalue);
|
||||
assert(ret_func);
|
||||
assert(ret_ltype);
|
||||
assert(ret_data);
|
||||
|
||||
for (t = table; t->lvalue; t++) {
|
||||
for (const ConfigTableItem *t = table; t->lvalue; t++) {
|
||||
|
||||
if (!streq(lvalue, t->lvalue))
|
||||
continue;
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct ConfigPerfItem {
|
||||
} ConfigPerfItem;
|
||||
|
||||
/* Prototype for a low-level gperf lookup function */
|
||||
typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_and_lvalue, unsigned length);
|
||||
typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_and_lvalue, GPERF_LEN_TYPE length);
|
||||
|
||||
/* Prototype for a generic high-level lookup function */
|
||||
typedef int (*ConfigItemLookup)(
|
||||
|
||||
@@ -39,6 +39,9 @@ static char *runtime_dir = NULL;
|
||||
|
||||
STATIC_DESTRUCTOR_REGISTER(runtime_dir, rm_rf_physical_and_freep);
|
||||
|
||||
/* For testing type compatibility. */
|
||||
_unused_ ConfigPerfItemLookup unused_lookup = load_fragment_gperf_lookup;
|
||||
|
||||
TEST_RET(unit_file_get_set) {
|
||||
int r;
|
||||
_cleanup_hashmap_free_ Hashmap *h = NULL;
|
||||
|
||||
Reference in New Issue
Block a user