diff options
-rw-r--r-- | compare/compare.c | 2 | ||||
-rw-r--r-- | profile/profile.c | 3 | ||||
-rw-r--r-- | test/test.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/compare/compare.c b/compare/compare.c index ee1966b..3cb3cff 100644 --- a/compare/compare.c +++ b/compare/compare.c @@ -570,7 +570,7 @@ fail: free(pos); const char *fmt = "Usage: %s ([-i] <input-dir>)+ [-o <output-dir>] [-s <scale:1-8>] [-p <pass-level:0-3>]\n"; - printf(fmt, argv[0]); + printf(fmt, argv[0] ? argv[0] : "compare"); return NULL; } diff --git a/profile/profile.c b/profile/profile.c index 3740a6c..28b818d 100644 --- a/profile/profile.c +++ b/profile/profile.c @@ -68,7 +68,8 @@ int main(int argc, char *argv[]) const int frame_h = 720; if (argc < 5) { - printf("usage: %s <subtitle file> <start time> <fps> <end time>\n", argv[0]); + printf("usage: %s <subtitle file> <start time> <fps> <end time>\n", + argv[0] ? argv[0] : "profile"); exit(1); } char *subfile = argv[1]; diff --git a/test/test.c b/test/test.c index f1de28f..b9754c9 100644 --- a/test/test.c +++ b/test/test.c @@ -199,7 +199,7 @@ int main(int argc, char *argv[]) if (argc != 4 && argc != 6) { printf("usage: %s <image file> <subtitle file> <time> " "[<storage width> <storage height>]\n", - argv[0]); + argv[0] ? argv[0] : "test"); exit(1); } char *imgfile = argv[1]; |