From 9e362de34f0e71b1ba9603ba71d233d1f62cd00a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 13 Feb 2006 19:07:31 +0000 Subject: [PATCH] (xuheader, xundump): Return -2 for empty input, so it can be distinguished from bad input. --- src/lib/common/xundump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index c43bc463..4dcb5ead 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -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))