@@ -3431,7 +3431,7 @@ read_yin_choice(struct lys_module *module, struct lys_node *parent, struct lyxml
34313431 /* check - default is prohibited in combination with mandatory */
34323432 if (dflt && (choice -> flags & LYS_MAND_TRUE )) {
34333433 LOGVAL (LYE_INCHILDSTMT , LY_VLOG_LYS , retval , "default" , "choice" );
3434- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "The \"default\" statement is forbidden on choices with \"mandatory\"." );
3434+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "The \"default\" statement is forbidden on choices with \"mandatory\"." );
34353435 goto error ;
34363436 }
34373437
@@ -3709,7 +3709,7 @@ read_yin_leaf(struct lys_module *module, struct lys_node *parent, struct lyxml_e
37093709 }
37103710 if (leaf -> dflt && (leaf -> flags & LYS_MAND_TRUE )) {
37113711 LOGVAL (LYE_INCHILDSTMT , LY_VLOG_LYS , retval , "mandatory" , "leaf" );
3712- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval ,
3712+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL ,
37133713 "The \"mandatory\" statement is forbidden on leaf with the \"default\" statement." );
37143714 goto error ;
37153715 }
@@ -3893,7 +3893,7 @@ read_yin_leaflist(struct lys_module *module, struct lys_node *parent, struct lyx
38933893 llist -> min = (uint32_t ) val ;
38943894 if (llist -> max && (llist -> min > llist -> max )) {
38953895 LOGVAL (LYE_INARG , LY_VLOG_LYS , retval , value , sub -> name );
3896- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "\"min-elements\" is bigger than \"max-elements\"." );
3896+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "\"min-elements\" is bigger than \"max-elements\"." );
38973897 goto error ;
38983898 }
38993899 } else if (!strcmp (sub -> name , "max-elements" )) {
@@ -3922,7 +3922,7 @@ read_yin_leaflist(struct lys_module *module, struct lys_node *parent, struct lyx
39223922 llist -> max = (uint32_t ) val ;
39233923 if (llist -> min > llist -> max ) {
39243924 LOGVAL (LYE_INARG , LY_VLOG_LYS , retval , value , sub -> name );
3925- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "\"max-elements\" is smaller than \"min-elements\"." );
3925+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "\"max-elements\" is smaller than \"min-elements\"." );
39263926 goto error ;
39273927 }
39283928 }
@@ -3995,7 +3995,7 @@ read_yin_leaflist(struct lys_module *module, struct lys_node *parent, struct lyx
39953995 for (r = 0 ; r < llist -> dflt_size ; r ++ ) {
39963996 if (ly_strequal (llist -> dflt [r ], value , 1 )) {
39973997 LOGVAL (LYE_INARG , LY_VLOG_LYS , retval , value , "default" );
3998- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "Duplicated default value \"%s\"." , value );
3998+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "Duplicated default value \"%s\"." , value );
39993999 goto error ;
40004000 }
40014001 }
@@ -4012,7 +4012,7 @@ read_yin_leaflist(struct lys_module *module, struct lys_node *parent, struct lyx
40124012
40134013 if (llist -> dflt_size && llist -> min ) {
40144014 LOGVAL (LYE_INCHILDSTMT , LY_VLOG_LYS , retval , "min-elements" , "leaf-list" );
4015- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval ,
4015+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL ,
40164016 "The \"min-elements\" statement with non-zero value is forbidden on leaf-lists with the \"default\" statement." );
40174017 goto error ;
40184018 }
@@ -4188,7 +4188,7 @@ read_yin_list(struct lys_module *module, struct lys_node *parent, struct lyxml_e
41884188 list -> min = (uint32_t ) val ;
41894189 if (list -> max && (list -> min > list -> max )) {
41904190 LOGVAL (LYE_INARG , LY_VLOG_LYS , retval , value , sub -> name );
4191- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "\"min-elements\" is bigger than \"max-elements\"." );
4191+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "\"min-elements\" is bigger than \"max-elements\"." );
41924192 lyxml_free (module -> ctx , sub );
41934193 goto error ;
41944194 }
@@ -4219,7 +4219,7 @@ read_yin_list(struct lys_module *module, struct lys_node *parent, struct lyxml_e
42194219 list -> max = (uint32_t ) val ;
42204220 if (list -> min > list -> max ) {
42214221 LOGVAL (LYE_INARG , LY_VLOG_LYS , retval , value , sub -> name );
4222- LOGVAL (LYE_SPEC , LY_VLOG_LYS , retval , "\"max-elements\" is smaller than \"min-elements\"." );
4222+ LOGVAL (LYE_SPEC , LY_VLOG_PREV , NULL , "\"max-elements\" is smaller than \"min-elements\"." );
42234223 goto error ;
42244224 }
42254225 }
0 commit comments