alesan
public c v1 · immutablestruct uci_context* ctx;struct uci_package* package = NULL;// Initialization of ctx and package...float get_float(char* section, char* option){ struct uci_element *element = NULL; float value; // the following line segfaults if(package && uci_lookup(ctx, &element, package, section, option) == UCI_OK) { value = strtod(uci_to_option(element)->value, NULL); return value; } return 0;}