Merge pull request #29989 from yuwata/conf-parser-arg-type

conf-parser: fix argument type
This commit is contained in:
Luca Boccassi
2023-11-12 17:30:44 +00:00
committed by GitHub
3 changed files with 5 additions and 4 deletions
+1 -3
View File
@@ -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;
+1 -1
View File
@@ -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)(
+3
View File
@@ -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;