diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-09-05 21:59:46 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-09-06 11:59:46 +1000 |
commit | 3aab0803b5401c8aed08813cb58d3a6f341fbb00 (patch) | |
tree | 76f8d9e9c655b5d66517bf0d08c775edf237e293 /src/async/async_op.c | |
parent | 375066e5cf6c16cb338452fa3a7dd032cd5aad8d (diff) | |
download | mongo-3aab0803b5401c8aed08813cb58d3a6f341fbb00.tar.gz |
WT-2888 Switch functions to return void where possible (#3019)
Some functions return an error code even though they don't need to. That adds complexity to our code. Switch to returning a void.
Diffstat (limited to 'src/async/async_op.c')
-rw-r--r-- | src/async/async_op.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/async/async_op.c b/src/async/async_op.c index 970c33c3360..2bdc9e4ec8e 100644 --- a/src/async/async_op.c +++ b/src/async/async_op.c @@ -205,7 +205,7 @@ __async_get_type(WT_ASYNC_OP *asyncop) * __async_op_init -- * Initialize all the op handle fields. */ -static int +static void __async_op_init(WT_CONNECTION_IMPL *conn, WT_ASYNC_OP_IMPL *op, uint32_t id) { WT_ASYNC_OP *asyncop; @@ -243,7 +243,6 @@ __async_op_init(WT_CONNECTION_IMPL *conn, WT_ASYNC_OP_IMPL *op, uint32_t id) op->internal_id = id; op->state = WT_ASYNCOP_FREE; - return (0); } /* @@ -330,7 +329,7 @@ __wt_async_op_init(WT_SESSION_IMPL *session) /* * Initialize the flush op structure. */ - WT_RET(__async_op_init(conn, &async->flush_op, OPS_INVALID_INDEX)); + __async_op_init(conn, &async->flush_op, OPS_INVALID_INDEX); /* * Allocate and initialize the work queue. This is sized so that @@ -346,7 +345,7 @@ __wt_async_op_init(WT_SESSION_IMPL *session) WT_ERR(__wt_calloc_def(session, conn->async_size, &async->async_ops)); for (i = 0; i < conn->async_size; i++) { op = &async->async_ops[i]; - WT_ERR(__async_op_init(conn, op, i)); + __async_op_init(conn, op, i); } return (0); |