summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-17 12:55:03 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-17 13:25:59 +0200
commit2f1b6b7d7f3370a6533650004e5838e274d13323 (patch)
treee1aeff53141198d9a71d178d749a11aa99657060 /src/tests
parent2ee334a235a73c08941f65c5b8e3697757458010 (diff)
downloadsssd-heimdal-1.tar.gz
sssd-heimdal-1.tar.bz2
sssd-heimdal-1.zip
heimdal: Fix warning in krb5-child-test's printtimeheimdal-1
This is when krb5_timestamp_to_sfstring is not available and thus the helper variables are not used. In future heimdal's krb5_format_time could be used on the heimdal side.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/krb5_child-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 89abfd4c..102827ed 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -290,17 +290,17 @@ child_done(struct tevent_req *req)
static void
printtime(krb5_timestamp ts)
{
+#ifdef HAVE_KRB5_TIMESTAMP_TO_SFSTRING
krb5_error_code kret;
char timestring[BUFSIZ];
char fill = '\0';
-#ifdef HAVE_KRB5_TIMESTAMP_TO_SFSTRING
kret = krb5_timestamp_to_sfstring(ts, timestring, BUFSIZ, &fill);
if (kret) {
KRB5_CHILD_TEST_DEBUG(SSSDBG_OP_FAILURE, kret);
}
printf("%s", timestring);
-#else
+#elif defined(HAVE_KRB5_FORMAT_TIME)
printf("%s", ctime(&ts));
#endif /* HAVE_KRB5_TIMESTAMP_TO_SFSTRING */
}