perf kmem: Fix compiler warning about may be accessing uninitialized variable

The last argument to strtok_r doesn't need to be initialized, its just a
placeholder to make this routine reentrant, but gcc doesn't know about
that and complains, breaking the build, fix it by setting it to NULL.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 427cde32
...@@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags) ...@@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags)
{ {
char *orig_flags = strdup(gfp_flags); char *orig_flags = strdup(gfp_flags);
char *new_flags = NULL; char *new_flags = NULL;
char *str, *pos; char *str, *pos = NULL;
size_t len = 0; size_t len = 0;
if (orig_flags == NULL) if (orig_flags == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册