All pastes #993324 Raw Edit

alesan

public c v1 · immutable
#993324 ·published 2008-04-22 15:18 UTC
rendered paste body
struct 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;}