summaryrefslogtreecommitdiff
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:43:59 +0200
commitb0b24bda5ee6403a051012c4be76a79d2051eb79 (patch)
treeb14b173006e850b8cef34cdfa70a14f99cde9db7
parent32452d9f03e2cc5b98b4f5ddd419428c191b76fd (diff)
downloadsssd-b0b24bda5ee6403a051012c4be76a79d2051eb79.tar.gz
sssd-b0b24bda5ee6403a051012c4be76a79d2051eb79.tar.bz2
sssd-b0b24bda5ee6403a051012c4be76a79d2051eb79.zip
heimdal: Fix warning in krb5-child-test's printtimeheimdal
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.
-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 */
}