(lookup_cmd_composition): Likewise.
+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
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. */
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. */