Breakage introduced in 92216c5864efccac when we changed the signature
of strtrim to return something more useful.

Fixes FS#39976.
---
 src/pacman/util.c  | 1 +
 src/util/pactree.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index d42e27b..ec2d3d2 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -299,6 +299,7 @@ size_t strtrim(char *str)
                size_t len = strlen(pch);
                if(len) {
                        memmove(str, pch, len + 1);
+                       pch = str;
                } else {
                        *str = '\0';
                }
diff --git a/src/util/pactree.c b/src/util/pactree.c
index 6c620aa..5c76542 100644
--- a/src/util/pactree.c
+++ b/src/util/pactree.c
@@ -159,6 +159,7 @@ static size_t strtrim(char *str)
                size_t len = strlen(pch);
                if(len) {
                        memmove(str, pch, len + 1);
+                       pch = str;
                } else {
                        *str = '\0';
                }
-- 
1.9.2


Reply via email to