chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a1102c1
)
unit-name: fix unit name escaping
author
Mike Kelly
<pioto@pioto.org>
Fri, 1 Oct 2010 23:58:07 +0000
(19:58 -0400)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Oct 2010 19:23:30 +0000
(21:23 +0200)
we want to do a bitwise shift, not a greater-than comparision
src/unit-name.c
patch
|
blob
|
history
diff --git
a/src/unit-name.c
b/src/unit-name.c
index 2e2948ab1d1f13ed701ee4e793ef5f1e0b90347b..868d13e4c99ac6dcc7fe83638221630211c2c551 100644
(file)
--- 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;