Audit dirname(1)

Be stricter about the number of arguments passed to it.
This commit is contained in:
FRIGN 2015-02-28 19:50:12 +01:00
parent cb610b2c7b
commit e45297a320
3 changed files with 5 additions and 5 deletions

2
README
View File

@ -24,7 +24,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
=* cron non-posix none
#* cut yes none
=* date yes -u
=* dirname yes none
=*| dirname yes none
=* du yes none
=* echo yes none
=* env yes none

View File

@ -1,4 +1,4 @@
.Dd January 23, 2015
.Dd February 28, 2015
.Dt DIRNAME 1
.Os sbase
.Sh NAME
@ -9,9 +9,9 @@
.Ar path
.Sh DESCRIPTION
.Nm
prints
writes
.Ar path
with its final path component removed.
with its final path component removed to stdout.
.Sh SEE ALSO
.Xr basename 1 ,
.Xr dirname 3

View File

@ -18,7 +18,7 @@ main(int argc, char *argv[])
usage();
} ARGEND;
if (argc < 1)
if (argc != 1)
usage();
puts(dirname(argv[0]));