diff options
author | 2016-03-13 02:22:06 +0100 | |
---|---|---|
committer | 2016-04-22 17:29:47 +0200 | |
commit | f1213b82771ce929c076339c24a777cfd59690e6 (patch) | |
tree | 3c74305e8848047d8ccd1228ee511d57cbf1b1a6 /vlib/vlib/unix/cli.c | |
parent | 2b836cf4d1e4e59ca34229a9fdf49d79216da20e (diff) |
Add clib_memcpy macro based on DPDK rte_memcpy implementation
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vlib/vlib/unix/cli.c')
-rw-r--r-- | vlib/vlib/unix/cli.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vlib/vlib/unix/cli.c b/vlib/vlib/unix/cli.c index 2cdd47691cd..2e6e0593280 100644 --- a/vlib/vlib/unix/cli.c +++ b/vlib/vlib/unix/cli.c @@ -240,7 +240,7 @@ static int unix_cli_line_edit (unix_main_t * um, unix_cli_file_t * cf) prev = cf->command_history [cf->excursion]; vec_validate (cf->current_command, vec_len(prev)-1); - memcpy (cf->current_command, prev, vec_len(prev)); + clib_memcpy (cf->current_command, prev, vec_len(prev)); _vec_len (cf->current_command) = vec_len(prev); unix_cli_add_pending_output (uf, cf, cf->current_command, vec_len (cf->current_command)); @@ -271,7 +271,7 @@ static int unix_cli_line_edit (unix_main_t * um, unix_cli_file_t * cf) unix_cli_add_pending_output (uf, cf, (u8 *) "\b\b \b\b\r\n", 8); vec_validate (cf->input_vector, vec_len(cf->current_command)-1); - memcpy (cf->input_vector, cf->current_command, + clib_memcpy (cf->input_vector, cf->current_command, vec_len(cf->current_command)); _vec_len(cf->input_vector) = _vec_len (cf->current_command); @@ -342,7 +342,7 @@ static int unix_cli_line_edit (unix_main_t * um, unix_cli_file_t * cf) vec_validate (cf->current_command, vec_len(item)-1); - memcpy (cf->current_command, item, vec_len(item)); + clib_memcpy (cf->current_command, item, vec_len(item)); _vec_len (cf->current_command) = vec_len(item); unix_cli_add_pending_output (uf, cf, cf->current_command, vec_len (cf->current_command)); |