]> git.droids-corp.org - dpdk.git/blobdiff - app/test/test_cmdline_num.c
test/crypto: fix build without rte_security
[dpdk.git] / app / test / test_cmdline_num.c
index ea6b9f1e36359391d6393d7b29435f52fb93a97a..4c97caf3d0bf29cd0ab1f1469c0fa586c4babbf1 100644 (file)
@@ -318,8 +318,7 @@ test_parse_num_invalid_param(void)
        token.num_data.type = UINT32;
 
        /* copy string to buffer */
-       snprintf(buf, sizeof(buf), "%s",
-                       num_valid_positive_strs[0].str);
+       strlcpy(buf, num_valid_positive_strs[0].str, sizeof(buf));
 
        /* try all null */
        ret = cmdline_parse_num(NULL, NULL, NULL, 0);