diff options
author | Ed Schouten <ed@FreeBSD.org> | 2014-04-23 14:05:28 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2014-04-23 14:05:28 +0000 |
commit | 43e0d7bfe0ecdc3105308c0a0cfa62c6e8dcd007 (patch) | |
tree | 8e86931c3407e7095d2744423492b353bb0f62b5 /usr.bin/bsdiff/bspatch/bspatch.c | |
parent | b4bb98ed6b3363db268f149bfffa87a93f82a994 (diff) |
Notes
Diffstat (limited to 'usr.bin/bsdiff/bspatch/bspatch.c')
-rw-r--r-- | usr.bin/bsdiff/bspatch/bspatch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c index d2af3ca869a2..db72e5c70236 100644 --- a/usr.bin/bsdiff/bspatch/bspatch.c +++ b/usr.bin/bsdiff/bspatch/bspatch.c @@ -57,6 +57,14 @@ static off_t offtin(u_char *buf) return y; } +static void +usage(void) +{ + + fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n"); + exit(1); +} + int main(int argc,char * argv[]) { FILE * f, * cpf, * dpf, * epf; @@ -72,7 +80,8 @@ int main(int argc,char * argv[]) off_t lenread; off_t i; - if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); + if (argc != 4) + usage(); /* Open patch file */ if ((f = fopen(argv[3], "rb")) == NULL) |