blob: daf90ad44d806eefd8961b4f1bf086ca790c8299 [file] [log] [blame]
Brad Bishop868407c2019-11-04 13:24:47 -05001From a3eba0fcee5e96ef47a6d3fac7196a1074f0dc17 Mon Sep 17 00:00:00 2001
2From: Adrian Bunk <bunk@stusta.de>
3Date: Wed, 30 Oct 2019 11:07:23 +0200
4Subject: Avoid use of "mips" which is reserved on mips
5
6Upstream-Status: Submitted [https://github.com/brasko/gdbwire/pull/9]
7
8Signed-off-by: Adrian Bunk <bunk@stusta.de>
9
10diff --git a/src/gdbwire_mi_parser.c b/src/gdbwire_mi_parser.c
11index 3f6b563..24aa0cf 100644
12--- a/lib/tgdb/gdbwire.c
13+++ b/lib/tgdb/gdbwire.c
14@@ -40,7 +40,7 @@ struct gdbwire_mi_parser {
15 /* The GDB/MI lexer state */
16 yyscan_t mils;
17 /* The GDB/MI push parser state */
18- gdbwire_mi_pstate *mips;
19+ gdbwire_mi_pstate *mipst;
20 /* The client parser callbacks */
21 struct gdbwire_mi_parser_callbacks callbacks;
22 };
23@@ -71,8 +71,8 @@ gdbwire_mi_parser_create(struct gdbwire_mi_parser_callbacks callbacks)
24 }
25
26 /* Create a new push parser state instance */
27- parser->mips = gdbwire_mi_pstate_new();
28- if (!parser->mips) {
29+ parser->mipst = gdbwire_mi_pstate_new();
30+ if (!parser->mipst) {
31 gdbwire_mi_lex_destroy(parser->mils);
32 gdbwire_string_destroy(parser->buffer);
33 free(parser);
34@@ -81,7 +81,7 @@ gdbwire_mi_parser_create(struct gdbwire_mi_parser_callbacks callbacks)
35
36 /* Ensure that the callbacks are non null */
37 if (!callbacks.gdbwire_mi_output_callback) {
38- gdbwire_mi_pstate_delete(parser->mips);
39+ gdbwire_mi_pstate_delete(parser->mipst);
40 gdbwire_mi_lex_destroy(parser->mils);
41 gdbwire_string_destroy(parser->buffer);
42 free(parser);
43@@ -109,9 +109,9 @@ void gdbwire_mi_parser_destroy(struct gdbwire_mi_parser *parser)
44 }
45
46 /* Free the push parser instance */
47- if (parser->mips) {
48- gdbwire_mi_pstate_delete(parser->mips);
49- parser->mips = NULL;
50+ if (parser->mipst) {
51+ gdbwire_mi_pstate_delete(parser->mipst);
52+ parser->mipst = NULL;
53 }
54
55 free(parser);
56@@ -162,7 +162,7 @@ gdbwire_mi_parser_parse_line(struct gdbwire_mi_parser *parser,
57 pattern = gdbwire_mi_lex(parser->mils);
58 if (pattern == 0)
59 break;
60- mi_status = gdbwire_mi_push_parse(parser->mips, pattern, NULL,
61+ mi_status = gdbwire_mi_push_parse(parser->mipst, pattern, NULL,
62 parser->mils, &output);
63 } while (mi_status == YYPUSH_MORE);
64
65--
662.20.1
67