From: Jens Axboe Date: Wed, 28 Feb 2007 08:32:54 +0000 (+0100) Subject: Duplicate name checks in ioengines.c X-Git-Tag: fio-1.13~27 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=bc5b77a8c46aabea554c4a2c8cca37f27f97969a Duplicate name checks in ioengines.c Signed-off-by: Jens Axboe --- diff --git a/ioengines.c b/ioengines.c index 14b15ccd..a7ccad66 100644 --- a/ioengines.c +++ b/ioengines.c @@ -77,16 +77,10 @@ static struct ioengine_ops *find_ioengine(const char *name) { struct ioengine_ops *ops; struct list_head *entry; - char engine[16]; - - strncpy(engine, name, sizeof(engine) - 1); - - if (!strncmp(engine, "linuxaio", 8) || !strncmp(engine, "aio", 3)) - strcpy(engine, "libaio"); list_for_each(entry, &engine_list) { ops = list_entry(entry, struct ioengine_ops, list); - if (!strcmp(engine, ops->name)) + if (!strcmp(name, ops->name)) return ops; }