diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-03-17 11:18:47 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-03-17 11:21:39 -0800 |
| commit | c7e46ee1bb0732bf64bcecd874f63a95b6b3ff38 (patch) | |
| tree | 961a872c814c31bf658b410c49e9723b80685508 | |
| parent | b63b5f4d244130aa0eaeaad4533483c62395dba3 (diff) | |
| download | tinyrad-c7e46ee1bb0732bf64bcecd874f63a95b6b3ff38.tar.gz tinyrad-c7e46ee1bb0732bf64bcecd874f63a95b6b3ff38.tar.bz2 tinyrad-c7e46ee1bb0732bf64bcecd874f63a95b6b3ff38.tar.xz tinyrad-c7e46ee1bb0732bf64bcecd874f63a95b6b3ff38.zip | |
libtinyrad: updating arguments in tinyrad_dict_import()
| -rw-r--r-- | include/tinyrad.h | 3 | ||||
| -rw-r--r-- | lib/libtinyrad/ldict.c | 6 | ||||
| -rw-r--r-- | tests/common-dict.c | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/include/tinyrad.h b/include/tinyrad.h index f8ad1dc..8b38381 100644 --- a/include/tinyrad.h +++ b/include/tinyrad.h | |||
| @@ -578,8 +578,7 @@ tinyrad_dict_import( | |||
| 578 | const TinyRadDictVendorDef * vendor_defs, | 578 | const TinyRadDictVendorDef * vendor_defs, |
| 579 | const TinyRadDictAttrDef * attr_defs, | 579 | const TinyRadDictAttrDef * attr_defs, |
| 580 | const TinyRadDictValueDef * value_defs, | 580 | const TinyRadDictValueDef * value_defs, |
| 581 | char *** msgsp, | 581 | char *** msgsp ); |
| 582 | uint32_t opts ); | ||
| 583 | 582 | ||
| 584 | 583 | ||
| 585 | _TINYRAD_F int | 584 | _TINYRAD_F int |
diff --git a/lib/libtinyrad/ldict.c b/lib/libtinyrad/ldict.c index cf429dd..838e096 100644 --- a/lib/libtinyrad/ldict.c +++ b/lib/libtinyrad/ldict.c | |||
| @@ -1363,7 +1363,7 @@ tinyrad_dict_defaults( | |||
| 1363 | assert(opts == 0); | 1363 | assert(opts == 0); |
| 1364 | if (tinyrad_dict_is_readonly(dict) == TRAD_YES) | 1364 | if (tinyrad_dict_is_readonly(dict) == TRAD_YES) |
| 1365 | return(TRAD_EDICTRO); | 1365 | return(TRAD_EDICTRO); |
| 1366 | return(tinyrad_dict_import(dict, tinyrad_dict_default_vendors, tinyrad_dict_default_attrs, tinyrad_dict_default_values, msgsp, opts)); | 1366 | return(tinyrad_dict_import(dict, tinyrad_dict_default_vendors, tinyrad_dict_default_attrs, tinyrad_dict_default_values, msgsp)); |
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| 1369 | 1369 | ||
| @@ -1373,8 +1373,7 @@ tinyrad_dict_import( | |||
| 1373 | const TinyRadDictVendorDef * vendor_defs, | 1373 | const TinyRadDictVendorDef * vendor_defs, |
| 1374 | const TinyRadDictAttrDef * attr_defs, | 1374 | const TinyRadDictAttrDef * attr_defs, |
| 1375 | const TinyRadDictValueDef * value_defs, | 1375 | const TinyRadDictValueDef * value_defs, |
| 1376 | char *** msgsp, | 1376 | char *** msgsp ) |
| 1377 | uint32_t opts ) | ||
| 1378 | { | 1377 | { |
| 1379 | int rc; | 1378 | int rc; |
| 1380 | size_t pos; | 1379 | size_t pos; |
| @@ -1396,7 +1395,6 @@ tinyrad_dict_import( | |||
| 1396 | TinyRadDebugTrace(); | 1395 | TinyRadDebugTrace(); |
| 1397 | 1396 | ||
| 1398 | assert(dict != NULL); | 1397 | assert(dict != NULL); |
| 1399 | assert(opts == 0); | ||
| 1400 | 1398 | ||
| 1401 | if ((msgsp)) | 1399 | if ((msgsp)) |
| 1402 | *msgsp = NULL; | 1400 | *msgsp = NULL; |
diff --git a/tests/common-dict.c b/tests/common-dict.c index f3f149c..172efe4 100644 --- a/tests/common-dict.c +++ b/tests/common-dict.c | |||
| @@ -336,7 +336,7 @@ our_dict_initialize( | |||
| 336 | 336 | ||
| 337 | // load test dictionary vendors | 337 | // load test dictionary vendors |
| 338 | trutils_verbose(opts, "adding test dictionary vendors ..."); | 338 | trutils_verbose(opts, "adding test dictionary vendors ..."); |
| 339 | if ((rc = tinyrad_dict_import(*dictp, test_dict_data_vendors, NULL, NULL, &errs, 0)) != TRAD_SUCCESS) | 339 | if ((rc = tinyrad_dict_import(*dictp, test_dict_data_vendors, NULL, NULL, &errs)) != TRAD_SUCCESS) |
| 340 | { | 340 | { |
| 341 | trutils_error(opts, errs, "tinyrad_dict_import(vendors): %s", tinyrad_strerror(rc)); | 341 | trutils_error(opts, errs, "tinyrad_dict_import(vendors): %s", tinyrad_strerror(rc)); |
| 342 | tinyrad_strsfree(errs); | 342 | tinyrad_strsfree(errs); |
| @@ -346,7 +346,7 @@ our_dict_initialize( | |||
| 346 | 346 | ||
| 347 | // load test dictionary attributes | 347 | // load test dictionary attributes |
| 348 | trutils_verbose(opts, "adding test dictionary attributes ..."); | 348 | trutils_verbose(opts, "adding test dictionary attributes ..."); |
| 349 | if ((rc = tinyrad_dict_import(*dictp, NULL, test_dict_data_attrs, NULL, &errs, 0)) != TRAD_SUCCESS) | 349 | if ((rc = tinyrad_dict_import(*dictp, NULL, test_dict_data_attrs, NULL, &errs)) != TRAD_SUCCESS) |
| 350 | { | 350 | { |
| 351 | trutils_error(opts, errs, "tinyrad_dict_import(attributes): %s", tinyrad_strerror(rc)); | 351 | trutils_error(opts, errs, "tinyrad_dict_import(attributes): %s", tinyrad_strerror(rc)); |
| 352 | tinyrad_strsfree(errs); | 352 | tinyrad_strsfree(errs); |
| @@ -356,7 +356,7 @@ our_dict_initialize( | |||
| 356 | 356 | ||
| 357 | // load test dictionary values | 357 | // load test dictionary values |
| 358 | trutils_verbose(opts, "adding test dictionary values ..."); | 358 | trutils_verbose(opts, "adding test dictionary values ..."); |
| 359 | if ((rc = tinyrad_dict_import(*dictp, NULL, NULL, test_dict_data_values, &errs, 0)) != TRAD_SUCCESS) | 359 | if ((rc = tinyrad_dict_import(*dictp, NULL, NULL, test_dict_data_values, &errs)) != TRAD_SUCCESS) |
| 360 | { | 360 | { |
| 361 | trutils_error(opts, errs, "tinyrad_dict_import(values): %s", tinyrad_strerror(rc)); | 361 | trutils_error(opts, errs, "tinyrad_dict_import(values): %s", tinyrad_strerror(rc)); |
| 362 | tinyrad_strsfree(errs); | 362 | tinyrad_strsfree(errs); |
