sbase

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

commit 2f6ffc9ec94b65a11e8842dce6bd8d6029b53c46
parent 66e1bbccf31147020ecc0fd09f7d9c15ce5a9f7e
Author: sin <sin@2f30.org>
Date:   Sun,  1 Feb 2015 15:55:30 +0000

No need to specify "rb" and "wb" in fopen, use "r" and "w"

Diffstat:
tar.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tar.c b/tar.c @@ -316,7 +316,7 @@ main(int argc, char *argv[]) switch (mode) { case 'c': if (file) { - if (!(fp = fopen(file, "wb"))) + if (!(fp = fopen(file, "w"))) eprintf("fopen %s:", file); if (lstat(file, &st) < 0) eprintf("tar: stat '%s':", file); @@ -332,7 +332,7 @@ main(int argc, char *argv[]) case 't': case 'x': if (file) { - if (!(fp = fopen(file, "rb"))) + if (!(fp = fopen(file, "r"))) eprintf("fopen %s:", file); } else { fp = stdin;