X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fany-reader.c;h=18a28c6d1ed14231dcb1be18c90d18c7d1dac08e;hb=f5c108becd49d78f4898cab11352291f5689d24e;hp=009e42270d5403866c431c8f4f6b171ed8b18702;hpb=7eee0554f378481faf447e2d2e940f389d6b05ec;p=pspp-builds.git diff --git a/src/data/any-reader.c b/src/data/any-reader.c index 009e4227..18a28c6d 100644 --- a/src/data/any-reader.c +++ b/src/data/any-reader.c @@ -37,7 +37,7 @@ #define _(msgid) gettext (msgid) /* Result of type detection. */ -enum detect_result +enum detect_result { YES, /* It is this type. */ NO, /* It is not this type. */ @@ -60,9 +60,9 @@ try_detect (struct file_handle *handle, bool (*detect) (FILE *)) fh_get_file_name (handle), strerror (errno)); return IO_ERROR; } - + is_type = detect (file); - + fn_close (fh_get_file_name (handle), file); return is_type ? YES : NO; @@ -74,7 +74,7 @@ try_detect (struct file_handle *handle, bool (*detect) (FILE *)) struct casereader * any_reader_open (struct file_handle *handle, struct dictionary **dict) { - switch (fh_get_referent (handle)) + switch (fh_get_referent (handle)) { case FH_REF_FILE: {