summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-07-09 11:46:39 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-09 13:49:21 -0400
commitd7abad9b7a25ad82c5290ce6abecfd2f0e6da03b (patch)
tree5a1dd39a79bd5657103cbb96f48d0a1c53187032
parent898eb701893c3df1bd9f536c47555db39a10667c (diff)
downloadsssd-d7abad9b7a25ad82c5290ce6abecfd2f0e6da03b.tar.gz
sssd-d7abad9b7a25ad82c5290ce6abecfd2f0e6da03b.tar.xz
sssd-d7abad9b7a25ad82c5290ce6abecfd2f0e6da03b.zip
Fix incorrect return value in tests
Coverity #12798
-rw-r--r--src/tests/krb5_utils-tests.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c
index 581212997..5fee4544b 100644
--- a/src/tests/krb5_utils-tests.c
+++ b/src/tests/krb5_utils-tests.c
@@ -389,6 +389,7 @@ START_TEST(test_cc_dir_create)
ret = cc_dir_create(residual, illegal_re, uid, gid, true);
fail_unless(ret == EOK, "cc_dir_create failed\n");
ret = rmdir(dirname);
+ if (ret < 0) ret = errno;
fail_unless(ret == 0, "Cannot remove %s: %s\n", dirname, strerror(ret));
talloc_free(residual);
@@ -401,6 +402,7 @@ START_TEST(test_cc_dir_create)
ret = cc_dir_create(residual, illegal_re, uid, gid, true);
fail_unless(ret == EOK, "cc_dir_create failed\n");
ret = rmdir(dirname);
+ if (ret < 0) ret = errno;
fail_unless(ret == 0, "Cannot remove %s: %s\n", dirname, strerror(ret));
talloc_free(residual);
free(cwd);