summaryrefslogtreecommitdiff
path: root/ioengines.c
diff options
context:
space:
mode:
Diffstat (limited to 'ioengines.c')
-rw-r--r--ioengines.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ioengines.c b/ioengines.c
index aa4ccd2..40fa75c 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -125,8 +125,7 @@ static struct ioengine_ops *__load_ioengine(const char *name)
{
char engine[64];
- engine[sizeof(engine) - 1] = '\0';
- strncpy(engine, name, sizeof(engine) - 1);
+ snprintf(engine, sizeof(engine), "%s", name);
/*
* linux libaio has alias names, so convert to what we want