aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/nng/nng.h2
-rw-r--r--src/nng.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index 07fe082c..e31e747a 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -1041,7 +1041,7 @@ NNG_DECL uint64_t nng_stat_timestamp(const nng_stat *);
// This version is synchronous, which means the caller will block until
// one of the sockets is closed. Note that caller is responsible for
// finally closing both sockets when this function returns.
-NNG_DECL int nng_device(nng_socket, nng_socket);
+NNG_DECL nng_err nng_device(nng_socket, nng_socket);
// Asynchronous form of nng_device. When this succeeds, the device is
// left intact and functioning in the background, until one of the sockets
diff --git a/src/nng.c b/src/nng.c
index 58b1f25c..a4d51508 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -1220,11 +1220,11 @@ nng_device_aio(nng_aio *aio, nng_socket s1, nng_socket s2)
}
}
-int
+nng_err
nng_device(nng_socket s1, nng_socket s2)
{
nni_aio aio;
- int rv;
+ nng_err rv;
nni_aio_init(&aio, NULL, NULL);
nng_device_aio(&aio, s1, s2);
nni_aio_wait(&aio);