diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-14 15:09:27 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-14 20:18:02 -0700 |
| commit | e3b8f31b044e4fe7d47439467fc1622266b5335c (patch) | |
| tree | deee625b2d01daa5558137f664c5b49d0a0e9e48 /src/compat | |
| parent | 0467702bf1e5b4777c254d4116d8f8972b5a44a2 (diff) | |
| download | nng-e3b8f31b044e4fe7d47439467fc1622266b5335c.tar.gz nng-e3b8f31b044e4fe7d47439467fc1622266b5335c.tar.bz2 nng-e3b8f31b044e4fe7d47439467fc1622266b5335c.zip | |
fixes #350 Incorrect compat error code from nn_setsockopt
Diffstat (limited to 'src/compat')
| -rw-r--r-- | src/compat/nanomsg/nn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compat/nanomsg/nn.c b/src/compat/nanomsg/nn.c index 5c6bbd7d..cbb88a27 100644 --- a/src/compat/nanomsg/nn.c +++ b/src/compat/nanomsg/nn.c @@ -835,7 +835,8 @@ nn_setsockopt(int s, int nnlevel, int nnopt, const void *valp, size_t sz) } if (name == NULL) { - return (ENOPROTOOPT); + errno = ENOPROTOOPT; + return (-1); } if ((rv = nng_setopt((nng_socket) s, name, valp, sz)) != 0) { |
