char *conf_file_dir;
-int args_init(args_t *args)
+void args_init(args_t *args)
{
- if (!args) {
- return EFAULT;
- }
memset(args, 0, sizeof(args_t));
args->dest = ARGS_DEFAULT_DEST;
args->multiple_providers = 0;
args->nocheckfordirorfile = 0;
args->noreadfeedsfile = 0;
-
- return 0;
}
void args_deinit(args_t *args)
#define ARGS_DEFAULT_VERBOSITY 1
#define ARGS_DEFAULT_AUTOREMOVE 0
-int args_init(args_t *args);
+void args_init(args_t *args);
void args_deinit(args_t *args);
int args_parse(args_t *args, int argc, char *argv[]);
void args_usage(char *complaint);
opkg = xcalloc(1, sizeof (opkg_t));
opkg->args = xcalloc(1, sizeof (args_t));
- err = args_init (opkg->args);
- if (err)
- {
- free (opkg->args);
- free (opkg);
- return NULL;
- }
+ args_init (opkg->args);
opkg->conf = xcalloc(1, sizeof (opkg_conf_t));
err = opkg_conf_init (opkg->conf, opkg->args);
static int set_and_load_pkg_dest_list(opkg_conf_t *conf,
nv_pair_list_t *nv_pair_list, char * lists_dir);
-int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options)
+void opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options)
{
opkg_option_t tmp[] = {
{ "cache", OPKG_OPT_TYPE_STRING, &conf->cache},
*options = xcalloc(1, sizeof(tmp));
memcpy(*options, tmp, sizeof(tmp));
- return 0;
};
static void opkg_conf_override_string(char **conf_str, char *arg_str)
#define regmatch_size 12
regmatch_t regmatch[regmatch_size];
- if (opkg_init_options_array(conf, &options)<0)
- return ENOMEM;
+ opkg_init_options_array(conf, &options);
if (file == NULL) {
fprintf(stderr, "%s: failed to open %s: %s\n",
char *root_filename_alloc(opkg_conf_t *conf, char *filename);
-int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options);
+void opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options);
#endif