init: silence bogus td == NULL warning
authorJens Axboe <axboe@fb.com>
Mon, 14 Apr 2014 18:07:36 +0000 (12:07 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 14 Apr 2014 18:07:36 +0000 (12:07 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
init.c

diff --git a/init.c b/init.c
index 21779c7b162fda0dadeb9f2238d7a334f7c7f3db..8ed1de6f965f5f3357da6265d40c623ed4749036 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1907,6 +1907,10 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                case FIO_GETOPT_IOENGINE: {
                        const char *opt = l_opts[lidx].name;
                        char *val = optarg;
+
+                       if (!td)
+                               break;
+
                        ret = fio_cmd_ioengine_option_parse(td, opt, val);
                        break;
                }