eal/linux: remove useless memset
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 14 Feb 2015 14:59:09 +0000 (09:59 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Mar 2015 20:50:42 +0000 (21:50 +0100)
The path variable is set via snprintf, and does not need to
memset before that.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c

index 590cb56..8d29e06 100644 (file)
@@ -84,8 +84,6 @@ get_num_hugepages(const char *subdir)
        else
                nr_hp_file = "free_hugepages";
 
-       memset(path, 0, sizeof(path));
-
        snprintf(path, sizeof(path), "%s/%s/%s",
                        sys_dir_path, subdir, nr_hp_file);