/* If arg_element->dest points to a place to store a possible value, read it If there is a callback registered, call it after  */
static void nsi_cmd_handle_this_matched_arg(char *argv, int offset, struct args_struct_t *arg_element)
/* If arg_element->dest points to a place to store a possible value, read it If there is a callback registered, call it after  */
static void nsi_cmd_handle_this_matched_arg(char *argv, int offset, struct args_struct_t *arg_element)
{
	if (arg_element->dest != NULL) {
		if (arg_element->is_switch) {
			if (arg_element->type == 'b') {
				*(bool *)arg_element->dest = true;
			} else {
				nsi_print_error_and_exit(CMD_ERR_BOOL_SWI);
			}
		} else {
			nsi_cmd_read_option_value(&argv[offset],
					      arg_element->dest,
					      arg_element->type,
					      arg_element->option);
		}
	}
	if (arg_element->call_when_found) {
		arg_element->call_when_found(argv, offset);
	}
}