]> granicus.if.org Git - libvpx/commitdiff
vpxdec: correct file op error messages
authorJames Zern <jzern@google.com>
Fri, 6 Feb 2015 05:06:29 +0000 (21:06 -0800)
committerJames Zern <jzern@google.com>
Fri, 6 Feb 2015 05:08:19 +0000 (21:08 -0800)
- use fatal() consistently
- correct wording in output file open failure message

Change-Id: I4dafe03c6eece6df53375f72adf0d5964e211c9a

vpxdec.c

index 310f4a059d49bb24a758799efaa8e2fca5ba5983..f99d1e43704f6d749122cfba7de29f9f51040ee3 100644 (file)
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -519,7 +519,7 @@ static FILE *open_outfile(const char *name) {
   } else {
     FILE *file = fopen(name, "wb");
     if (!file)
-      fatal("Failed to output file %s", name);
+      fatal("Failed to open output file '%s'", name);
     return file;
   }
 }
@@ -725,8 +725,7 @@ int main_loop(int argc, const char **argv_) {
   infile = strcmp(fn, "-") ? fopen(fn, "rb") : set_binary_mode(stdin);
 
   if (!infile) {
-    fprintf(stderr, "Failed to open file '%s'", strcmp(fn, "-") ? fn : "stdin");
-    return EXIT_FAILURE;
+    fatal("Failed to open input file '%s'", strcmp(fn, "-") ? fn : "stdin");
   }
 #if CONFIG_OS_SUPPORT
   /* Make sure we don't dump to the terminal, unless forced to with -o - */