From: Ken Raeburn Date: Thu, 15 Jun 2006 21:10:09 +0000 (+0000) Subject: (krb5_ldap_put_principal): Add parens around assignment in equality test. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33cb67c8bfa7a7e5aa7a90221f05260e68041b5d;p=thirdparty%2Fkrb5.git (krb5_ldap_put_principal): Add parens around assignment in equality test. (getstringtime): Don't assume time_t and krb5_timestamp are the same type; copy the value. (No overflow check done.) git-svn-id: svn://anonsvn.mit.edu/krb5/branches/ldap-integ@18145 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c index 4b15e2320d..6509ff9e7f 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c @@ -932,7 +932,7 @@ krb5_ldap_put_principal(context, entries, nentries, db_args) char *subtreednlist[2]={NULL}; krb5_boolean dnoutofsubtree=TRUE; - if(st=krb5_get_policydn(context, entries, &oldpolicydn) != 0) + if ((st=krb5_get_policydn(context, entries, &oldpolicydn)) != 0) goto cleanup; if (strlen(xargs.tktpolicydn) != 0) { @@ -1281,12 +1281,13 @@ getstringtime(epochtime) { struct tm tme; char *strtime=NULL; + time_t posixtime = epochtime; strtime = calloc (50, 1); if (strtime == NULL) return NULL; - if (gmtime_r((const time_t *)&epochtime, &tme) == NULL) + if (gmtime_r(&posixtime, &tme) == NULL) return NULL; strftime(strtime, 50, "%Y%m%d%H%M%SZ", &tme);