X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_cfgfile%2Frte_cfgfile.c;h=1ef298592fa58a771c22a76fd182c140833829ad;hb=1b58407653efa1a69ba8872b2724263554b5e4f4;hp=f8e7627a5169749e857ba6fc32586b44d70d66f2;hpb=6796c5ddafe6159ea0096b61d0fc9b91aa15992e;p=dpdk.git diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c index f8e7627a51..1ef298592f 100644 --- a/lib/librte_cfgfile/rte_cfgfile.c +++ b/lib/librte_cfgfile/rte_cfgfile.c @@ -160,9 +160,9 @@ struct rte_cfgfile * rte_cfgfile_load_with_params(const char *filename, int flags, const struct rte_cfgfile_parameters *params) { - char buffer[CFG_NAME_LEN + CFG_VALUE_LEN + 4] = {0}; + char buffer[CFG_NAME_LEN + CFG_VALUE_LEN + 4]; int lineno = 0; - struct rte_cfgfile *cfg = NULL; + struct rte_cfgfile *cfg; if (rte_cfgfile_check_params(params)) return NULL; @@ -174,7 +174,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags, cfg = rte_cfgfile_create(flags); while (fgets(buffer, sizeof(buffer), f) != NULL) { - char *pos = NULL; + char *pos; size_t len = strnlen(buffer, sizeof(buffer)); lineno++; if ((len >= sizeof(buffer) - 1) && (buffer[len-1] != '\n')) { @@ -260,7 +260,7 @@ struct rte_cfgfile * rte_cfgfile_create(int flags) { int i; - struct rte_cfgfile *cfg = NULL; + struct rte_cfgfile *cfg; cfg = malloc(sizeof(*cfg));