If there are no querystat file, whine.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20783 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-02 00:47:21 +00:00
parent 4f97424296
commit e3909014e4

View File

@@ -2240,8 +2240,11 @@ hx509_query_unparse_stats(hx509_context context, int printtype, FILE *out)
if (context->querystat == NULL)
return;
f = fopen(context->querystat, "r");
if (f == NULL)
if (f == NULL) {
fprintf(out, "No statistic file %s: %s.\n",
context->querystat, strerror(errno));
return;
}
memset(stats, 0, sizeof(stats));
while (fscanf(f, "%d %d\n", &type, &mask) == 2) {