mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
config_helper: allow json_load_cli() to be called with constant arguments
This commit is contained in:
parent
0709235502
commit
32ffab7632
2 changed files with 7 additions and 6 deletions
|
@ -43,7 +43,7 @@ int json_to_config(json_t *json, config_setting_t *parent);
|
|||
#endif /* LIBCONFIG_FOUND */
|
||||
|
||||
/* Create a JSON object from command line parameters. */
|
||||
json_t *json_load_cli(int argc, char *argv[]);
|
||||
json_t *json_load_cli(int argc, const char *argv[]);
|
||||
|
||||
int json_object_extend_str(json_t *orig, const char *str);
|
||||
|
||||
|
|
|
@ -248,12 +248,13 @@ success:
|
|||
json_object_set(subobj, key1, new);
|
||||
}
|
||||
|
||||
json_t * json_load_cli(int argc, char *argv[])
|
||||
json_t * json_load_cli(int argc, const char *argv[])
|
||||
{
|
||||
char *opt;
|
||||
char *key = NULL;
|
||||
char *value = NULL;
|
||||
char *sep, *cpy;
|
||||
const char *opt;
|
||||
const char *key = NULL;
|
||||
const char *value = NULL;
|
||||
const char *sep;
|
||||
char *cpy;
|
||||
|
||||
json_t *json = json_object();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue