mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Use obstack_grow_str
We already have macro obstack_grow_str, which is helpful to shorten the code. gdb: 2017-06-28 Yao Qi <yao.qi@linaro.org> * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str instead of obstack_grow.
This commit is contained in:
parent
88305e1b9f
commit
bc491f2e76
@ -1,3 +1,8 @@
|
||||
2017-06-28 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
|
||||
instead of obstack_grow.
|
||||
|
||||
2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
|
||||
|
||||
PR gdb/21337
|
||||
|
@ -141,7 +141,7 @@ mi_argv_to_format (char **argv, int argc)
|
||||
|
||||
xsnprintf (tmp, sizeof (tmp), "\\%o",
|
||||
(unsigned char) argv[0][i]);
|
||||
obstack_grow (&obstack, tmp, strlen (tmp));
|
||||
obstack_grow_str (&obstack, tmp);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -152,7 +152,7 @@ mi_argv_to_format (char **argv, int argc)
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
obstack_1grow (&obstack, ',');
|
||||
obstack_grow (&obstack, argv[i], strlen (argv[i]));
|
||||
obstack_grow_str (&obstack, argv[i]);
|
||||
}
|
||||
obstack_1grow (&obstack, '\0');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user