artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9412f04
)
When invoked with no file arguments, display usage and fail instead of
author
guenther
<guenther@openbsd.org>
Tue, 2 Jan 2018 06:56:41 +0000
(06:56 +0000)
committer
guenther
<guenther@openbsd.org>
Tue, 2 Jan 2018 06:56:41 +0000
(06:56 +0000)
silently doing nothing.
suggested by Klemens Nanni (kl3 (at) posteo.org), from FreeBSD r92772
ok millert@
usr.bin/paste/paste.c
patch
|
blob
|
history
diff --git
a/usr.bin/paste/paste.c
b/usr.bin/paste/paste.c
index
4b00413
..
fd51bfa
100644
(file)
--- a/
usr.bin/paste/paste.c
+++ b/
usr.bin/paste/paste.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: paste.c,v 1.2
2 2015/12/09 19:39:10 mmcc Exp $
*/
+/* $OpenBSD: paste.c,v 1.2
3 2018/01/02 06:56:41 guenther Exp $
*/
/*
* Copyright (c) 1989 The Regents of the University of California.
@@
-77,6
+77,9
@@
main(int argc, char *argv[])
argc -= optind;
argv += optind;
+ if (argc == 0)
+ usage();
+
if (!delim) {
delimcnt = 1;
delim = "\t";