summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-09-30 13:35:51 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-09-30 13:35:51 +0100
commitcf8ef63c4a5cbbc29f655a076b2e57c144ad8316 (patch)
tree31f945d0706f78232f58d10349815609ebe18186 /utf8.c
parentec9e03d09a20ca00dd9d96f7938a2d03a504b535 (diff)
Fix some warnings, GitHub issue 2382.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index e640d845..458363b8 100644
--- a/utf8.c
+++ b/utf8.c
@@ -100,9 +100,9 @@ utf8_put_item(const char *data, size_t size, u_int *index)
ui = utf8_item_by_data(data, size);
if (ui != NULL) {
+ *index = ui->index;
log_debug("%s: found %.*s = %u", __func__, (int)size, data,
*index);
- *index = ui->index;
return (0);
}
@@ -117,8 +117,8 @@ utf8_put_item(const char *data, size_t size, u_int *index)
ui->size = size;
RB_INSERT(utf8_data_tree, &utf8_data_tree, ui);
- log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
*index = ui->index;
+ log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
return (0);
}