diff options
author | Guy Harris <gharris@sonic.net> | 2022-10-15 14:16:10 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-10-15 14:16:10 -0700 |
commit | f86a0d5ab4c408e8a7907f9e54194076820cc268 (patch) | |
tree | 2e021d71b3a772ffe40284505d736d6ade72dbdf /epan/tvbuff.c | |
parent | ab7b71605c078c35286e85f618605c9fc53c1dbd (diff) |
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.
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 5 |
1 files changed, 1 insertions, 4 deletions
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--; |