X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Funit-name.c;h=6d45576f8546120081dc45c0f035633514c063e3;hb=e025b4c306d4b0895786839ebbb934188edc6e61;hp=debf2b265333c0bbcb66f2a014275e09afcdf2ec;hpb=95e501f8ab28e1645453219523c0263754db3f68;p=elogind.git diff --git a/src/unit-name.c b/src/unit-name.c index debf2b265..6d45576f8 100644 --- a/src/unit-name.c +++ b/src/unit-name.c @@ -213,7 +213,7 @@ char *unit_name_build_escape(const char *prefix, const char *instance, const cha * suffix and makes a nice string suitable as unit name of it, * escaping all weird chars on the way. * - * / becomes ., and all chars not alloweed in a unit name get + * / becomes ., and all chars not allowed in a unit name get * escaped as \xFF, including \ and ., of course. This * escaping is hence reversible. * @@ -272,9 +272,10 @@ char *unit_name_unescape(const char *f) { else if (*f == '\\') { int a, b; - if (f[1] != 'x' || (a = unhexchar(f[2])) < 0 || - (b = unhexchar(f[3])) < 0) { - /* Invalid escape code, let's take it literal then */ + if (f[1] != 'x' || + (a = unhexchar(f[2])) < 0 || + (b = unhexchar(f[3])) < 0) { + /* Invalid escape code, let's take it literal then */ *(t++) = '\\'; } else { *(t++) = (char) ((a << 4) | b);