From 9461d3e85bb33d2162d323abd32759a0dfccb59a Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Wed, 3 Jul 2024 10:21:26 +0200 Subject: [PATCH] fix: revert encoding_clear changes --- src/net/encoding.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/net/encoding.c b/src/net/encoding.c index a03bcd0b2..e09243a01 100644 --- a/src/net/encoding.c +++ b/src/net/encoding.c @@ -39,11 +39,7 @@ _z_encoding_t _z_encoding_wrap(uint16_t id, const char *schema) { _z_encoding_t _z_encoding_null(void) { return _z_encoding_wrap(_Z_ENCODING_ID_DEFAULT, NULL); } -void _z_encoding_clear(_z_encoding_t *encoding) { - if (_z_string_check(&encoding->schema)) { - _z_string_clear(&encoding->schema); - } -} +void _z_encoding_clear(_z_encoding_t *encoding) { _z_string_clear(&encoding->schema); } _Bool _z_encoding_check(const _z_encoding_t *encoding) { return ((encoding->id != _Z_ENCODING_ID_DEFAULT) || _z_string_check(&encoding->schema));