[systemd-devel] [PATCH 3/3] test: test for wellipsize_mem (requires user)

Shawn Landden shawn at churchofgit.com
Wed Sep 11 07:47:39 PDT 2013


---
 src/shared/util.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/shared/util.c b/src/shared/util.c
index c6375e5..b791433 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3310,14 +3310,14 @@ char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, u
                 continue;
 
         memcpy(r, s, x);
-        r[x] = 0xe2;
-        r[x+1] = 0x80;
-        r[x+2] = 0xa6;
+        r[x] = '.';
+        r[x+1] = '.';
+        r[x+2] = '.';
 
         for (j=(x+3);(unsigned char)s[j] & 0x80;j++)
                 continue;
 
-        memcpy(r + x + 1,
+        memcpy(r + x + 3,
                s + old_length - (new_length - j),
                new_length - j);
 
-- 
1.8.4.rc3



More information about the systemd-devel mailing list