From 83e06e802c65bcc810483992838ac05fd173aae7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 30 Jun 2017 11:07:30 -0400 Subject: Cleanup: Remove unnecessary variable --- src/writer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/writer.c b/src/writer.c index 75d61bc8..6d9055e8 100644 --- a/src/writer.c +++ b/src/writer.c @@ -204,15 +204,14 @@ write_character(SerdWriter* writer, const uint8_t* utf8, size_t* size) { const uint8_t replacement_char[] = { 0xEF, 0xBF, 0xBD }; char escape[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - const uint8_t in = utf8[0]; - uint32_t c = parse_utf8_char(writer, utf8, size); + const uint32_t c = parse_utf8_char(writer, utf8, size); switch (*size) { case 0: - w_err(writer, SERD_ERR_BAD_ARG, "invalid UTF-8: %X\n", in); + w_err(writer, SERD_ERR_BAD_ARG, "invalid UTF-8: %X\n", utf8[0]); return sink(replacement_char, sizeof(replacement_char), writer); case 1: - snprintf(escape, sizeof(escape), "\\u%04X", in); + snprintf(escape, sizeof(escape), "\\u%04X", utf8[0]); return sink(escape, 6, writer); default: break; -- cgit v1.2.1