From: Greg Hudson Date: Sun, 6 Oct 2013 00:13:39 +0000 (-0400) Subject: Fix audit test module initialization X-Git-Tag: krb5-1.13-alpha1~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab;p=thirdparty%2Fkrb5.git Fix audit test module initialization Check if the fopen result is NULL, not whether it's less than zero. ticket: 7713 (new) target_version: 1.12 tags: pullups --- diff --git a/src/plugins/audit/test/au_test.c b/src/plugins/audit/test/au_test.c index 54bf564b15..76e711e534 100644 --- a/src/plugins/audit/test/au_test.c +++ b/src/plugins/audit/test/au_test.c @@ -55,9 +55,8 @@ static krb5_error_code open_au(krb5_audit_moddata *auctx) { au_fd = fopen("au.log", "a+"); - if ( au_fd < 0) { + if (au_fd == NULL) return KRB5_PLUGIN_NO_HANDLE; /* audit module is unavailable */ - } k5_mutex_init(&lock); return 0; }