examples/accel perf: fix small issue with params

Need to check that a valid workload type was specified and print
usage if not.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib956e28f9049e49f19adcc09e861db42034799b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1900
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
paul luse 2020-04-16 09:16:24 -04:00 committed by Tomasz Zawadzki
parent 1d141f4adb
commit 3667603765

View File

@ -386,8 +386,9 @@ main(int argc, char **argv)
goto cleanup;
}
if (strcmp(g_workload_type, "copy") &&
strcmp(g_workload_type, "fill")) {
if (g_workload_type == NULL ||
(strcmp(g_workload_type, "copy") &&
strcmp(g_workload_type, "fill"))) {
usage();
rc = -1;
goto cleanup;