lys_features_find(const struct lys_module *module, const char *name)
{
    int i, j;

    /* module itself */
    for (i = 0; i < module->features_size; i++) {
        if (!strcmp(name, module->features[i].name)) {
            return &module->features[i];
        }
    }

    /* submodules */
    for (j = 0; j < module->inc_size; j++) {
        for (i = 0; i < module->inc[j].submodule->features_size; i++) {
            if (!strcmp(name, module->inc[j].submodule->features[i].name)) {
                return &module->inc[j].submodule->features[i];
            }
        }
    }

    return NULL;
}
lys_features_find(const struct lys_module *module, const char *name)
{
    int i, j;

     
    for (i = 0; i < module->features_size; i++) {
        if (!strcmp(name, module->features[i].name)) {
            return &module->features[i];
        }
    }

     
    for (j = 0; j < module->inc_size; j++) {
        for (i = 0; i < module->inc[j].submodule->features_size; i++) {
            if (!strcmp(name, module->inc[j].submodule->features[i].name)) {
                return &module->inc[j].submodule->features[i];
            }
        }
    }

    return NULL;
}