diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-25 18:01:49 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-25 18:05:56 -0800 |
| commit | 7b02ddc2d7077439992a10bb69553f89b5ee5903 (patch) | |
| tree | c3c6467330be2b38491f0df061d7016e713b1892 /src/core/protocol.h | |
| parent | 6237d268514e1f8aec562052954db22c4540eec3 (diff) | |
| download | nng-7b02ddc2d7077439992a10bb69553f89b5ee5903.tar.gz nng-7b02ddc2d7077439992a10bb69553f89b5ee5903.tar.bz2 nng-7b02ddc2d7077439992a10bb69553f89b5ee5903.zip | |
Socket and context initialization never fails.
This makes these functions entirely bullet proof, and eliminates
yet more error handling cases.
Diffstat (limited to 'src/core/protocol.h')
| -rw-r--r-- | src/core/protocol.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/protocol.h b/src/core/protocol.h index a8645763..6118a2ac 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -63,7 +63,7 @@ struct nni_proto_ctx_ops { // ctx_init initializes a new context. The second argument is the // protocol specific socket structure. - int (*ctx_init)(void *, void *); + void (*ctx_init)(void *, void *); // ctx_fini destroys a context. void (*ctx_fini)(void *); @@ -85,7 +85,7 @@ struct nni_proto_sock_ops { // sock_init initializes the protocol instance, which will be stored // on the socket. This is run without the sock lock held. - int (*sock_init)(void *, nni_sock *); + void (*sock_init)(void *, nni_sock *); // sock_fini destroys the protocol instance. This is run without the // socket lock held, and is intended to release resources. It may |
