summaryrefslogtreecommitdiff
path: root/server/tests
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-11-06 18:20:26 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-11-09 10:53:49 -0500
commita991a6bc456c840bf7c2c292c5711c80002f5754 (patch)
tree8543011fa1d796829e13770d0174174f5aaffbc3 /server/tests
parenta69766ff324dcd2c3543c6969e3f77c38c4dc629 (diff)
downloadsssd-a991a6bc456c840bf7c2c292c5711c80002f5754.tar.gz
sssd-a991a6bc456c840bf7c2c292c5711c80002f5754.tar.bz2
sssd-a991a6bc456c840bf7c2c292c5711c80002f5754.zip
Check return, zero free hostent, adhere to style
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/resolv-tests.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/tests/resolv-tests.c b/server/tests/resolv-tests.c
index 71a49310..ea1ac9fb 100644
--- a/server/tests/resolv-tests.c
+++ b/server/tests/resolv-tests.c
@@ -141,7 +141,8 @@ static void test_localhost(struct tevent_req *req)
test_ctx->done = true;
- recv_status = resolv_gethostbyname_recv(test_ctx, req, &status, NULL, &hostent);
+ recv_status = resolv_gethostbyname_recv(req, test_ctx,
+ &status, NULL, &hostent);
talloc_zfree(req);
if (recv_status != EOK) {
DEBUG(2, ("resolv_gethostbyname_recv failed: %d\n", recv_status));
@@ -205,7 +206,8 @@ static void test_negative(struct tevent_req *req)
test_ctx = tevent_req_callback_data(req, struct resolv_test_ctx);
test_ctx->done = true;
- recv_status = resolv_gethostbyname_recv(test_ctx, req, &status, NULL, &hostent);
+ recv_status = resolv_gethostbyname_recv(req, test_ctx,
+ &status, NULL, &hostent);
talloc_zfree(req);
if (recv_status == EOK) {
DEBUG(7, ("resolv_gethostbyname_recv succeeded in a negative test"));
@@ -270,8 +272,8 @@ static void test_internet(struct tevent_req *req)
switch (test_ctx->tested_function) {
case TESTING_HOSTNAME:
- recv_status = resolv_gethostbyname_recv(tmp_ctx, req, &status, NULL,
- &hostent);
+ recv_status = resolv_gethostbyname_recv(req, tmp_ctx,
+ &status, NULL, &hostent);
test_ctx->error = (hostent->h_length == 0) ? ENOENT : EOK;
break;
case TESTING_TXT: