From: Mike Kelly Date: Fri, 1 Oct 2010 23:58:07 +0000 (-0400) Subject: unit-name: fix unit name escaping X-Git-Tag: v11~16 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=df37291a5198818e5bb1d11c34ba134aa3d79d96 unit-name: fix unit name escaping we want to do a bitwise shift, not a greater-than comparision --- diff --git a/src/unit-name.c b/src/unit-name.c index 2e2948ab1..868d13e4c 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;