aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-06-30 11:07:30 -0400
committerDavid Robillard <d@drobilla.net>2017-06-30 11:07:30 -0400
commit83e06e802c65bcc810483992838ac05fd173aae7 (patch)
tree4303fbca05a65e57be2130858e09644956eda879 /src/writer.c
parent5ef8f2ded745e4e96fd03fe0f634edc2fecea431 (diff)
downloadserd-83e06e802c65bcc810483992838ac05fd173aae7.tar.gz
serd-83e06e802c65bcc810483992838ac05fd173aae7.tar.bz2
serd-83e06e802c65bcc810483992838ac05fd173aae7.zip
Cleanup: Remove unnecessary variable
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c7
1 files changed, 3 insertions, 4 deletions
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;