[vte] parser: Remove excessive clearing of sequence fields



commit 8c8ac7c7b0e65525a11f5ccb8eb570639672d017
Author: Christian Persch <chpe src gnome org>
Date:   Tue Mar 27 19:40:13 2018 +0200

    parser: Remove excessive clearing of sequence fields
    
    seq.command is set when the sequence is executed,
    seq.terminator is set when the final character is received,
    and seq.introducer is set when the introducer is received,
    and all this happens before the sequence is dispatched.
    
    Therefore these fiedls need not be cleared in any case.

 src/parser.cc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/parser.cc b/src/parser.cc
index 37ca341..a859a46 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -563,12 +563,12 @@ void vte_parser_deinit(struct vte_parser *parser)
 
 static inline int parser_clear(struct vte_parser *parser, uint32_t raw)
 {
-        parser->seq.command = VTE_CMD_NONE;
-        parser->seq.terminator = 0;
-
-        /* We don't need to do this, since it's only used when it's been set */
-        /* parser->seq.introducer = 0; */
-
+        /* seq.command is set when the sequence is executed,
+         * seq.terminator is set when the final character is received,
+         * and seq.introducer is set when the introducer is received,
+         * and all this happens before the sequence is dispatched.
+         * Therefore these fiedls need not be cleared in any case.
+         */
         return VTE_SEQ_NONE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]