X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Flinuxapp%2Feal%2Feal.c;h=f99e1586380d6b6b6dec7cc111a045af354c67cf;hb=b4f60f55570468619100552b4e1fa96e337826f6;hp=648ef8140111d279506fd08d10bb771272e2b6d6;hpb=01e66999efcb62efd5ed649045845f763e8b6379;p=dpdk.git diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 648ef81401..f99e158638 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -865,6 +865,7 @@ rte_eal_check_module(const char *module_name) { char mod_name[30]; /* Any module names can be longer than 30 bytes? */ int ret = 0; + int n; if (NULL == module_name) return -1; @@ -876,8 +877,8 @@ rte_eal_check_module(const char *module_name) return -1; } while (!feof(fd)) { - fscanf(fd, "%29s %*[^\n]", mod_name); - if (!strcmp(mod_name, module_name)) { + n = fscanf(fd, "%29s %*[^\n]", mod_name); + if ((n == 1) && !strcmp(mod_name, module_name)) { ret = 1; break; }