libyang REFACTOR avoid constant literals
Improve readability of the code.
Includes also unification of "no break in the case" comment to "fall
through".
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 21b30ad..432bb7d 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -876,8 +876,8 @@
}*/
/* create node */
- ret = lyd_create_opaq(xmlctx->ctx, "eventTime", 9, prefix, prefix_len, ns->uri, strlen(ns->uri), xmlctx->value,
- xmlctx->value_len, NULL, LY_PREF_XML, NULL, LYD_NODEHINT_ENVELOPE, &et);
+ ret = lyd_create_opaq(xmlctx->ctx, "eventTime", ly_strlen_const("eventTime"), prefix, prefix_len,
+ ns->uri, strlen(ns->uri), xmlctx->value, xmlctx->value_len, NULL, LY_PREF_XML, NULL, LYD_NODEHINT_ENVELOPE, &et);
LY_CHECK_GOTO(ret, cleanup);
/* assign atributes */