sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 1bc002b44acdbfec8d374bfd0e5a858a142c0378
parent cf5114a13337b8d079f36e671db15934ebc14c46
Author: FRIGN <dev@frign.de>
Date:   Tue, 17 Mar 2015 21:30:12 +0100

Audit paste(1)

Well, basically there was not a lot to do, as I already (fortunately)
audited this code a while back.
There were only minor style-changes.

Diffstat:
MREADME | 2+-
Mpaste.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README b/README @@ -51,7 +51,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support, =*| nice yes none = nl no -d, -f, -h, -p =*| nohup yes none -#* paste yes none +#*| paste yes none =*| printenv non-posix none #* printf yes none =*| pwd yes none diff --git a/paste.c b/paste.c @@ -102,7 +102,7 @@ main(int argc, char *argv[]) usage(); } ARGEND; - if (argc == 0) + if (!argc) usage(); /* populate delimiters */ @@ -114,7 +114,7 @@ main(int argc, char *argv[]) dsc = ereallocarray(NULL, argc, sizeof(*dsc)); for (i = 0; i < argc; i++) { - if (strcmp(argv[i], "-") == 0) + if (!strcmp(argv[i], "-")) dsc[i].fp = stdin; else dsc[i].fp = fopen(argv[i], "r");