commit | be9136af2f63530ad7235f94f03fdf3aeb641edb | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Oct 06 15:25:20 2023 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Oct 06 15:35:19 2023 +0200 |
tree | 1ba00cd7585900da50097069ea0192d73cf1f3fd | |
parent | 591188049fb5fc647481c1486e4d58de6ac566e3 [diff] [blame] |
common OPTIMIZE minor optimizations
diff --git a/src/common.c b/src/common.c index 806a016..c976de4 100644 --- a/src/common.c +++ b/src/common.c
@@ -176,12 +176,7 @@ uint32_t c, aux; size_t len; - if (bytes_read) { - (*bytes_read) = 0; - } - c = (*input)[0]; - LY_CHECK_RET(!c, LY_EINVAL); if (!(c & 0x80)) { /* one byte character */ @@ -238,6 +233,9 @@ return LY_EINVAL; } } else { + if (bytes_read) { + (*bytes_read) = 0; + } return LY_EINVAL; }