pidgin/pidgin

Use more get_paren_level

2021-02-06, Arkadiy Illarionov
aef08fe14d13
Parents 19a07f7215f8
Children 3a58ef28ee44
Use more get_paren_level

Deduplicate code.

Testing Done:
Compile.

Reviewed at https://reviews.imfreedom.org/r/480/
--- a/libpurple/protocols/zephyr/zephyr_tzc.c Wed Feb 03 18:51:15 2021 -0600
+++ b/libpurple/protocols/zephyr/zephyr_tzc.c Sat Feb 06 01:41:47 2021 -0600
@@ -362,12 +362,7 @@
escape_next = TRUE;
}
if(!in_quote) {
- if(source[end] == '(') {
- nesting++;
- }
- if(source[end] == ')') {
- nesting--;
- }
+ nesting = get_paren_level(nesting, source[end]);
}
if(source[end] == '"') {
in_quote = !in_quote;