[vte] widget: Set out param only once



commit 620923938f6dc82ae06f3c8c5e4d542e283ce183
Author: Christian Persch <chpe src gnome org>
Date:   Fri May 1 10:21:16 2020 +0200

    widget: Set out param only once

 src/vtegtk.cc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index eb7147ab..af32a166 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -2293,7 +2293,7 @@ vte_terminal_event_check_regex_array(VteTerminal *terminal,
                                      gsize *n_matches)
 {
         if (n_matches)
-                *n_matches = 0;
+                *n_matches = n_regexes;
 
         if (n_regexes == 0)
                 return nullptr;
@@ -2307,8 +2307,6 @@ vte_terminal_event_check_regex_array(VteTerminal *terminal,
                                                    matches.get()))
             return nullptr;
 
-        if (n_matches)
-                *n_matches = n_regexes;
         return matches.release();
 }
 


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