Skip to content

Commit e5cafbf

Browse files
committed
fixup! parser & printer CHANGE xpath1.0 type correct handling
1 parent e1ba81d commit e5cafbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ lyp_parse_value(struct lys_type *type, const char **value_, struct lyxml_elem *x
19011901

19021902
/* special handling of ietf-yang-types xpath1.0 */
19031903
for (tpdf = type->der;
1904-
tpdf->module && strcmp(tpdf->name, "xpath1.0") && strcmp(tpdf->module->name, "ietf-yang-types");
1904+
tpdf->module && (strcmp(tpdf->name, "xpath1.0") || strcmp(tpdf->module->name, "ietf-yang-types"));
19051905
tpdf = tpdf->type.der);
19061906
if (tpdf->module && xml) {
19071907
/* convert value into the json format */

src/printer_xml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ xml_print_leaf(struct lyout *out, int level, const struct lyd_node *node, int to
296296
return EXIT_FAILURE;
297297
}
298298
for (tpdf = type->der;
299-
tpdf->module && strcmp(tpdf->name, "xpath1.0") && strcmp(tpdf->module->name, "ietf-yang-types");
299+
tpdf->module && (strcmp(tpdf->name, "xpath1.0") || strcmp(tpdf->module->name, "ietf-yang-types"));
300300
tpdf = tpdf->type.der);
301301
/* special handling of ietf-yang-types xpath1.0 */
302302
if (tpdf->module) {

0 commit comments

Comments
 (0)