From d7abad9b7a25ad82c5290ce6abecfd2f0e6da03b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 9 Jul 2012 11:46:39 -0400 Subject: Fix incorrect return value in tests Coverity #12798 --- src/tests/krb5_utils-tests.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c index 58121299..5fee4544 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); -- cgit