Handle empty files.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2571 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-07-24 03:53:41 +00:00
parent 90795fd4f0
commit 324b8b2531

View File

@@ -158,6 +158,7 @@ krb5_config_parse_file (const char *fname, krb5_config_section **res)
f = fopen (fname, "r");
if (f == NULL)
return -1;
*res = NULL;
for (lineno = 1; fgets(buf, sizeof(buf), f) != NULL; ++lineno) {
char *p;
@@ -290,6 +291,9 @@ krb5_config_vget_next (krb5_config_section *c,
krb5_config_binding *b;
const char *p;
if(c == NULL)
return NULL;
if (*pointer == NULL) {
b = c;
p = va_arg(args, const char *);