summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Kelly <pioto@pioto.org>2010-10-01 19:58:07 -0400
committerLennart Poettering <lennart@poettering.net>2010-10-05 21:23:30 +0200
commitdf37291a5198818e5bb1d11c34ba134aa3d79d96 (patch)
tree75e3e5d20a7c198a593b4bbd50d293448847a307 /src
parenta1102c1f63dfee7f3649c86c5d8df8faba541123 (diff)
unit-name: fix unit name escaping
we want to do a bitwise shift, not a greater-than comparision
Diffstat (limited to 'src')
-rw-r--r--src/unit-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unit-name.c b/src/unit-name.c
index 2e2948ab1d..868d13e4c9 100644
--- a/src/unit-name.c
+++ b/src/unit-name.c
@@ -211,7 +211,7 @@ static char* do_escape(const char *f, char *t) {
else if (*f == '-' || *f == '\\' || !strchr(VALID_CHARS, *f)) {
*(t++) = '\\';
*(t++) = 'x';
- *(t++) = hexchar(*f > 4);
+ *(t++) = hexchar(*f >> 4);
*(t++) = hexchar(*f);
} else
*(t++) = *f;