[vte] parser: Annotate unlikely conditionals
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] parser: Annotate unlikely conditionals
- Date: Tue, 27 Mar 2018 17:47:36 +0000 (UTC)
commit 3596fa22cfeff920c025380ed532c11003a3dcc2
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:13 2018 +0200
parser: Annotate unlikely conditionals
src/parser.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/parser.cc b/src/parser.cc
index 7f746cf..6a3c32d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -631,7 +631,7 @@ static int parser_osc_collect(struct vte_parser *parser, uint32_t raw)
* Our state-machine already verifies those restrictions.
*/
- if (!vte_seq_string_push(&parser->seq.arg_str, raw))
+ if (G_UNLIKELY(!vte_seq_string_push(&parser->seq.arg_str, raw)))
parser->state = STATE_ST_IGNORE;
return VTE_SEQ_NONE;
@@ -671,7 +671,7 @@ static int parser_dcs_consume(struct vte_parser *parser, uint32_t raw)
static int parser_dcs_collect(struct vte_parser *parser, uint32_t raw)
{
- if (!vte_seq_string_push(&parser->seq.arg_str, raw))
+ if (G_UNLIKELY(!vte_seq_string_push(&parser->seq.arg_str, raw)))
parser->state = STATE_DCS_IGNORE;
return VTE_SEQ_NONE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]