From f86a0d5ab4c408e8a7907f9e54194076820cc268 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 15 Oct 2022 14:16:10 -0700 Subject: Use wmem_strbuf_append_unichar_repl() to append a REPLACEMENT CHARACTER. Replace several instances in which a REPLACEMENT CHARACTER was being appended to a wmem_strbuf with a call to wmem_strbuf_append_unichar_repl(). This reduces the number of explicit 0x00fffd or 0xfffd or... in the code. --- epan/tvbuff.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'epan/tvbuff.c') diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 99378f1c58..344d811ff3 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -2654,9 +2654,6 @@ tvb_format_stringzpad_wsp(wmem_allocator_t* allocator, tvbuff_t *tvb, const gint return format_text_wsp(allocator, ptr, stringlen); } -/* Unicode REPLACEMENT CHARACTER */ -#define UNREPL 0x00FFFD - /* * All string functions below take a scope as an argument. * @@ -3062,7 +3059,7 @@ tvb_get_apn_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, if (ch < 0x80) wmem_strbuf_append_c(str, ch); else - wmem_strbuf_append_unichar(str, UNREPL); + wmem_strbuf_append_unichar_repl(str); ptr++; label_len--; length--; -- cgit v1.2.3