doc: add note for vhost builtin example
[dpdk.git] / lib / librte_cmdline / cmdline.c
index d9042f0..cfd703e 100644 (file)
@@ -24,7 +24,7 @@
 
 static void
 cmdline_valid_buffer(struct rdline *rdl, const char *buf,
-                    __attribute__((unused)) unsigned int size)
+                    __rte_unused unsigned int size)
 {
        struct cmdline *cl = rdl->opaque;
        int ret;
@@ -69,7 +69,7 @@ cmdline_set_prompt(struct cmdline *cl, const char *prompt)
 {
        if (!cl || !prompt)
                return;
-       snprintf(cl->prompt, sizeof(cl->prompt), "%s", prompt);
+       strlcpy(cl->prompt, prompt, sizeof(cl->prompt));
 }
 
 struct cmdline *