Fix boolean return type value

This commit is contained in:
vdutta 2021-12-24 14:33:08 +05:30
parent d55ec5effd
commit 58833df4b7

View file

@ -850,7 +850,7 @@ static int get_EthernetLink_Enable(char *refparam, struct dmctx *ctx, void *data
dmuci_get_value_by_section_string((struct uci_section *)data, "section_name", &int_name); dmuci_get_value_by_section_string((struct uci_section *)data, "section_name", &int_name);
s = get_origin_section_from_config("network", "interface", int_name); s = get_origin_section_from_config("network", "interface", int_name);
dmuci_get_value_by_section_string(s, "disabled", value); dmuci_get_value_by_section_string(s, "disabled", value);
*value = (strcmp(*value, "1") == 0) ? "False" : "True"; *value = (strcmp(*value, "1") == 0) ? "0" : "1";
return 0; return 0;
} }