]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/yang_wrappers.c
Merge pull request #12708 from donaldsharp/no_notification
[mirror_frr.git] / lib / yang_wrappers.c
index bee76c6e0f51b797818f3d6ee1a79d345ff486e5..d22379dd237e5f68b19f83b25b1d965f44552a31 100644 (file)
@@ -58,6 +58,7 @@
                }                                                              \
        } while (0)
 
+PRINTFRR(2, 0)
 static inline const char *
 yang_dnode_xpath_get_canon(const struct lyd_node *dnode, const char *xpath_fmt,
                           va_list ap)
@@ -75,6 +76,7 @@ yang_dnode_xpath_get_canon(const struct lyd_node *dnode, const char *xpath_fmt,
        return lyd_get_value(&__dleaf->node);
 }
 
+PRINTFRR(2, 0)
 static inline const struct lyd_value *
 yang_dnode_xpath_get_value(const struct lyd_node *dnode, const char *xpath_fmt,
                           va_list ap)
@@ -715,7 +717,7 @@ size_t yang_dnode_get_binary_buf(char *buf, size_t size,
 
        canon = YANG_DNODE_XPATH_GET_CANON(dnode, xpath_fmt);
        cannon_len = strlen(canon);
-       decode_len = cannon_len;
+       decode_len = cannon_len + 1;
        value_str = (char *)malloc(decode_len);
        base64_init_decodestate(&s);
        cnt = base64_decode_block(canon, cannon_len, value_str, &s);