diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-12 14:43:31 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-12 14:43:31 -0800 |
| commit | 2ddaecdadb8a931188b3f3e6b8ad43b9cba45d0f (patch) | |
| tree | ddab0fbc8bb631fc31c233e09cd83a561988158d /src/nng.c | |
| parent | d88484cafbf973d55dc95b7edcae5064efa8bad0 (diff) | |
| download | nng-2ddaecdadb8a931188b3f3e6b8ad43b9cba45d0f.tar.gz nng-2ddaecdadb8a931188b3f3e6b8ad43b9cba45d0f.tar.bz2 nng-2ddaecdadb8a931188b3f3e6b8ad43b9cba45d0f.zip | |
api: extend usage of nng_err
This replaces the int, and we will expand this further, as this
makes it clear that the int is actually an error code and helps in
debuggers that can provide symbolic values.
Diffstat (limited to 'src/nng.c')
| -rw-r--r-- | src/nng.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1234,7 +1234,7 @@ nng_device(nng_socket s1, nng_socket s2) } static const struct { - int code; + nng_err code; const char *msg; } nni_errors[] = { // clang-format off @@ -1276,7 +1276,7 @@ static const struct { // Misc. const char * -nng_strerror(int num) +nng_strerror(nng_err num) { static char unknownerrbuf[32]; for (int i = 0; nni_errors[i].msg != NULL; i++) { @@ -1859,7 +1859,7 @@ nng_sleep_aio(nng_duration ms, nng_aio *aio) nni_sleep_aio(ms, aio); } -int +nng_err nng_aio_result(nng_aio *aio) { return (nni_aio_result(aio)); @@ -1890,7 +1890,7 @@ nng_aio_busy(nng_aio *aio) } void -nng_aio_abort(nng_aio *aio, int err_code) +nng_aio_abort(nng_aio *aio, nng_err err_code) { nni_aio_abort(aio, err_code); } |
