(xuheader, xundump): Return -2 for empty input, so it can be
distinguished from bad input.
This commit is contained in:
parent
6ed05a024c
commit
9e362de34f
1 changed files with 2 additions and 2 deletions
|
@ -540,7 +540,7 @@ xuheader(FILE *fp, int expected_table)
|
|||
while ((ch = skipfs(fp)) == '\n')
|
||||
lineno++;
|
||||
if (ch == EOF && expected_table == EF_BAD)
|
||||
return -1;
|
||||
return -2;
|
||||
ungetc(ch, fp);
|
||||
|
||||
human = ch == 'c';
|
||||
|
@ -639,7 +639,7 @@ xundump(FILE *fp, char *file, int expected_table)
|
|||
}
|
||||
|
||||
if ((type = xuheader(fp, expected_table)) < 0)
|
||||
return -1;
|
||||
return type;
|
||||
|
||||
ca = ef_cadef(type);
|
||||
if (CANT_HAPPEN(!ca))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue