[hackers] [sbase] No need to specify "rb" and "wb" in fopen, use "r" and "w" || sin
commit 2ce23d6a0f85b78f98bfd7fd19a42afa7c7bd62a
Author: sin <sin_AT_2f30.org>
Date: Sun Feb 1 15:55:30 2015 +0000
No need to specify "rb" and "wb" in fopen, use "r" and "w"
diff --git a/tar.c b/tar.c
index df24952..b081f00 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -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);
_AT_@ -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;
Received on Sun Feb 01 2015 - 16:56:04 CET
This archive was generated by hypermail 2.3.0
: Sun Feb 01 2015 - 17:00:10 CET