diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-17 00:08:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-17 00:10:34 +0100 |
commit | 925d456de9181967f752a57edd03689ab5967782 (patch) | |
tree | 681ab1663b03e423c4d737f4e0f7a1679ec764e4 | |
parent | increase readability of humansize (diff) | |
download | slibc-925d456de9181967f752a57edd03689ab5967782.tar.gz slibc-925d456de9181967f752a57edd03689ab5967782.tar.bz2 slibc-925d456de9181967f752a57edd03689ab5967782.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/slibc-human/unescape.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slibc-human/unescape.c b/src/slibc-human/unescape.c index 6224c15..941ea9b 100644 --- a/src/slibc-human/unescape.c +++ b/src/slibc-human/unescape.c @@ -82,7 +82,7 @@ char* unescape(char* str, enum unescape_mode mode) if (str == NULL) return errno = 0, NULL; if (mode & ~31) goto invalid; - if (mod == 0) mode |= UNESCAPE_EINVAL | UNESCAPE_MOD_UTF8; + if (mode == 0) mode |= UNESCAPE_MOD_UTF8; switch (mode & 7) { case 0: @@ -156,7 +156,7 @@ char* unescape(char* str, enum unescape_mode mode) default: if (RANGE('0', *r, '7')) { - int v = *r - '0'; + v = *r - '0'; NEXT_OCTAL(v); NEXT_OCTAL(v); if (ASCII()); @@ -166,7 +166,7 @@ char* unescape(char* str, enum unescape_mode mode) #define X(e, i) else if (strstarts(r, e) ? (*w++ = i, r += sizeof(e) / sizeof(char) - 2, 1) : 0); LIST_ASCII_NAMES #undef X - else UNRECOGNISED(r--); + else UNRECOGNISED(*r, r--); break; } |