* cli/cli-decode.c (lookup_cmd_1): Use memcpy.

(lookup_cmd_composition): Likewise.
This commit is contained in:
Tom Tromey 2008-07-30 01:10:17 +00:00
parent d5529a849e
commit 22ad7fee2a
2 changed files with 7 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2008-07-29 Tom Tromey <tromey@redhat.com>
* cli/cli-decode.c (lookup_cmd_1): Use memcpy.
(lookup_cmd_composition): Likewise.
2008-07-29 Tom Tromey <tromey@redhat.com>
* cli/cli-cmds.c (edit_command): Remove unused variables. Delete

View File

@ -1112,11 +1112,7 @@ lookup_cmd_1 (char **text, struct cmd_list_element *clist,
command = (char *) alloca (len + 1);
for (tmp = 0; tmp < len; tmp++)
{
char x = (*text)[tmp];
command[tmp] = x;
}
memcpy (command, *text, len);
command[len] = '\0';
/* Look it up. */
@ -1468,11 +1464,7 @@ lookup_cmd_composition (char *text,
it's length is len). We copy this into a local temporary */
command = (char *) alloca (len + 1);
for (tmp = 0; tmp < len; tmp++)
{
char x = text[tmp];
command[tmp] = x;
}
memcpy (command, text, len);
command[len] = '\0';
/* Look it up. */