File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -962,6 +962,21 @@ static Token *dup_tlist_reverse(const Token *list, Token *tail)
962
962
return tail ;
963
963
}
964
964
965
+ /*
966
+ * Append an existing tlist to a tail pointer and returns the
967
+ * updated tail pointer.
968
+ */
969
+ static Token * * steal_tlist (Token * tlist , Token * * tailp )
970
+ {
971
+ * tailp = tlist ;
972
+
973
+ if (!tlist )
974
+ return tailp ;
975
+
976
+ list_last (tlist , tlist );
977
+ return & tlist -> next ;
978
+ }
979
+
965
980
/*
966
981
* Free an MMacro
967
982
*/
@@ -5517,8 +5532,7 @@ static Token *expand_mmac_params(Token * tline)
5517
5532
tt = tokenize (tok_text (t ));
5518
5533
tt = expand_mmac_params (tt );
5519
5534
tt = expand_smacro (tt );
5520
- /* Why dup_tlist() here? We should own tt... */
5521
- dup_tlist (tt , & tail );
5535
+ tail = steal_tlist (tt , tail );
5522
5536
text = NULL ;
5523
5537
change = true;
5524
5538
break ;
You can’t perform that action at this time.
0 commit comments