aboutsummaryrefslogtreecommitdiffstats
path: root/src/slibc-human
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-17 00:08:11 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-17 00:10:34 +0100
commit925d456de9181967f752a57edd03689ab5967782 (patch)
tree681ab1663b03e423c4d737f4e0f7a1679ec764e4 /src/slibc-human
parentincrease readability of humansize (diff)
downloadslibc-925d456de9181967f752a57edd03689ab5967782.tar.gz
slibc-925d456de9181967f752a57edd03689ab5967782.tar.bz2
slibc-925d456de9181967f752a57edd03689ab5967782.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/slibc-human')
-rw-r--r--src/slibc-human/unescape.c6
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;
}