Permalink
Browse files

Make apeinfo use new apetag error handling

  • Loading branch information...
1 parent b738679 commit efc916f09d81b4f5df9fc97d979594818caa7e6b @jeremyevans committed Feb 27, 2013
Showing with 3 additions and 9 deletions.
  1. +3 −9 c/apeinfo.c
View
@@ -47,14 +47,8 @@ int ApeInfo_process(char *filename) {
}
status = ApeTag_parse(tag);
- if (status == 0) {
-
- } else if (status == -1 || (status == -2 && (ferror(file) != 0))) {
- warn(NULL);
- ret = 1;
- goto apeinfo_process_error;
- } else if (status == -3) {
- warnx("%s", ApeTag_error(tag));
+ if (status == -1) {
+ warnx("%s: %s", filename, ApeTag_error(tag));
ret = 1;
goto apeinfo_process_error;
}
@@ -72,7 +66,7 @@ int ApeInfo_process(char *filename) {
ApeTag_free(tag);
if (file != NULL) {
if (fclose(file) != 0) {
- warn(NULL);
+ warn("%s", filename);
}
}

0 comments on commit efc916f

Please sign in to comment.