#include <string.h>
#include <inttypes.h>
#include <ctype.h>
-#include <termios.h>
#include <netinet/in.h>
#include <rte_string_fns.h>
-#include "cmdline_rdline.h"
-#include "cmdline_parse.h"
-#include "cmdline.h"
+#include "cmdline_private.h"
#ifdef RTE_LIBRTE_CMDLINE_DEBUG
#define debug_printf printf
if (!strncmp(partial_tok, tmpbuf,
partial_tok_len)) {
if (comp_len == -1) {
- snprintf(comp_buf, sizeof(comp_buf),
- "%s", tmpbuf + partial_tok_len);
+ strlcpy(comp_buf,
+ tmpbuf + partial_tok_len,
+ sizeof(comp_buf));
comp_len =
strnlen(tmpbuf + partial_tok_len,
sizeof(tmpbuf) - partial_tok_len);