Error/warning cleanups for clang (LLVM)

This commit is contained in:
Nicolas Williams
2011-11-28 14:42:06 -06:00
parent c757eb7fb0
commit 265d9ba5ca
2 changed files with 7 additions and 3 deletions

View File

@@ -433,8 +433,12 @@ main(int argc, char **argv)
#endif
{
char *tty = ttyname (STDERR_FILENO);
syslog (LOG_NOTICE | LOG_AUTH, tty ? "%s to %s on %s" : "%s to %s",
login_info->pw_name, su_info->pw_name, tty);
if (tty)
syslog (LOG_NOTICE | LOG_AUTH, "%s to %s on %s",
login_info->pw_name, su_info->pw_name, tty);
else
syslog (LOG_NOTICE | LOG_AUTH, "%s to %s",
login_info->pw_name, su_info->pw_name);
}

View File

@@ -53,7 +53,7 @@ kdc_openlog(krb5_context context,
char *ss;
if (asprintf(&ss, "0-1/FILE:%s/%s", hdb_db_dir(context),
KDC_LOG_FILE) < 0)
err(1, NULL);
err(1, "out of memory");
krb5_addlog_dest(context, config->logf, ss);
free(ss);
}