diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-04-21 08:35:20 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-04-21 08:35:20 (GMT) |
commit | e78975aea8dc6b091d56f5ac4c0bd6def598f070 (patch) | |
tree | 987b933a81e2119e11f8021c9cbb9de1c1521d4c /tests/test-socket-creation.c | |
parent | 9af54690041aaa0a4934c336709bdf42a57afe28 (diff) | |
download | libnl-e78975aea8dc6b091d56f5ac4c0bd6def598f070.zip libnl-e78975aea8dc6b091d56f5ac4c0bd6def598f070.tar.gz libnl-e78975aea8dc6b091d56f5ac4c0bd6def598f070.tar.bz2 |
tests: fix test programs to compile again
Diffstat (limited to 'tests/test-socket-creation.c')
-rw-r--r-- | tests/test-socket-creation.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/test-socket-creation.c b/tests/test-socket-creation.c index a170ccd..83f3ad4 100644 --- a/tests/test-socket-creation.c +++ b/tests/test-socket-creation.c @@ -1,23 +1,24 @@ -#include "../src/utils.h" +#include <netlink/netlink.h> +#include <errno.h> int main(int argc, char *argv[]) { struct nl_sock *h[1025]; int i; - h[0] = nl_handle_alloc(); + h[0] = nl_socket_alloc(); printf("Created handle with port 0x%x\n", nl_socket_get_local_port(h[0])); - nl_handle_destroy(h[0]); - h[0] = nl_handle_alloc(); + nl_socket_free(h[0]); + h[0] = nl_socket_alloc(); printf("Created handle with port 0x%x\n", nl_socket_get_local_port(h[0])); - nl_handle_destroy(h[0]); + nl_socket_free(h[0]); for (i = 0; i < 1025; i++) { - h[i] = nl_handle_alloc(); + h[i] = nl_socket_alloc(); if (h[i] == NULL) - nl_perror("Unable to allocate socket"); + nl_perror(ENOMEM, "Unable to allocate socket"); else printf("Created handle with port 0x%x\n", nl_socket_get_local_port(h[i])); |