summaryrefslogtreecommitdiff
path: root/src/rexmpp_xml.c
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2023-10-22 13:46:03 +0300
committerdefanor <defanor@uberspace.net>2023-10-22 13:46:03 +0300
commit2a5c3db244708d528f357adeb7e6ec947161fbad (patch)
tree5ff275e4677e1be481540ae7daf1e66e6338e4b8 /src/rexmpp_xml.c
parent205fb31965b51b650b40bb3f0e54ec0cfdead36a (diff)
Fix a couple of bugs, refactor a little
Found a couple of issues with -fanalyzer, though CWE-401 (analyzer-malloc-leak) appears to produce false positives still.
Diffstat (limited to 'src/rexmpp_xml.c')
-rw-r--r--src/rexmpp_xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rexmpp_xml.c b/src/rexmpp_xml.c
index 442a49e..9c3dd23 100644
--- a/src/rexmpp_xml.c
+++ b/src/rexmpp_xml.c
@@ -250,7 +250,7 @@ int rexmpp_xml_remove_attr (rexmpp_xml_t *node,
}
/* Adds a character, grows the string as needed. */
-inline char *rexmpp_str_putc (char *str, size_t *len, char c) {
+static inline char *rexmpp_str_putc (char *str, size_t *len, char c) {
char *ret = str;
if ((*len) % 1024 == 0) {
ret = realloc(str, (*len) + 1024);
@@ -372,9 +372,9 @@ char *rexmpp_xml_print_raw (char *str, size_t *len, const char *text) {
return ret;
}
-inline char *rexmpp_xml_print_indent (char *str,
- size_t *len,
- int indent) {
+static inline char *rexmpp_xml_print_indent (char *str,
+ size_t *len,
+ int indent) {
if (indent <= 0) {
return str;
}