perf tools: Don't allow empty argument for field-separator
authorWang Nan <wangnan0@huawei.com>
Fri, 20 Mar 2015 02:57:52 +0000 (02:57 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 Mar 2015 20:49:51 +0000 (17:49 -0300)
commit8b8ca6e15e392b366a7d69c6bf1abaae005f2b63
tree64df00847713dd35e37580f5bf9ff615e0574a1b
parent0635b0f71424be7706793ac260d063491a2889a0
perf tools: Don't allow empty argument for field-separator

Both 'perf diff' and 'perf mem' have 'field-separator' option, which
causes segfault if passed with empty string. This patch uses previously
introduced 'OPT_STRING_NOEMPTY' option macro to prevent fault.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: pi3orama@163.com
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Link: http://lkml.kernel.org/r/1426820272-23302-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-diff.c
tools/perf/builtin-mem.c