diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-10 19:12:52 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-11 09:58:00 +0200 |
commit | a4c78bb29b5ad9ac18e5edbbc5f81c54c67ff4d4 (patch) | |
tree | 3977bde3cd6776fb823daacf0e823e702017f176 /src/lib/dev.c | |
parent | 7fe877685ccdef8f88ef7450aab3e724be4cd616 (diff) | |
download | ouroboros-a4c78bb29b5ad9ac18e5edbbc5f81c54c67ff4d4.tar.gz ouroboros-a4c78bb29b5ad9ac18e5edbbc5f81c54c67ff4d4.zip |
lib: Fix return values in ap_init()
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r-- | src/lib/dev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index 433fb93b..18890234 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -268,7 +268,7 @@ int ap_init(const char * ap_name) if (ai.fqset == NULL) { bmp_destroy(ai.fqueues); bmp_destroy(ai.fds); - return -1; + return -ENOMEM; } ai.rdrb = shm_rdrbuff_open(); @@ -285,7 +285,7 @@ int ap_init(const char * ap_name) shm_flow_set_destroy(ai.fqset); bmp_destroy(ai.fqueues); bmp_destroy(ai.fds); - return -1; + return -ENOMEM; } for (i = 0; i < AP_MAX_FLOWS; ++i) @@ -298,7 +298,7 @@ int ap_init(const char * ap_name) shm_flow_set_destroy(ai.fqset); bmp_destroy(ai.fqueues); bmp_destroy(ai.fds); - return -1; + return -ENOMEM; } if (ap_name != NULL) { @@ -319,7 +319,7 @@ int ap_init(const char * ap_name) shm_flow_set_destroy(ai.fqset); bmp_destroy(ai.fqueues); bmp_destroy(ai.fds); - return -1; + return -EIRMD; } } |