aboutsummaryrefslogtreecommitdiff
path: root/editors/diff.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
committerRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
commita4f58436b78fe59e57620c6e0301f213ee25f273 (patch)
tree8355f724926e605280af2d6f2b1ccc6b1bd02dee /editors/diff.c
parentba0c36cfcf84efbac6f89e27238e04bb57e9cd45 (diff)
parent49acc1a7618a28d34381cbb7661d7c981fcb238f (diff)
downloadbusybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.gz
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.bz2
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.zip
Merge branch 'busybox' into merge
Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
Diffstat (limited to 'editors/diff.c')
-rw-r--r--editors/diff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/diff.c b/editors/diff.c
index a78a0ee28..c3ad31bf3 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -740,9 +740,10 @@ static int diffreg(char *file[2])
740 unlink(name); 740 unlink(name);
741 if (bb_copyfd_eof(fd, fd_tmp) < 0) 741 if (bb_copyfd_eof(fd, fd_tmp) < 0)
742 xfunc_die(); 742 xfunc_die();
743 if (fd) /* Prevents closing of stdin */ 743 if (fd != STDIN_FILENO)
744 close(fd); 744 close(fd);
745 fd = fd_tmp; 745 fd = fd_tmp;
746 xlseek(fd, 0, SEEK_SET);
746 } 747 }
747 fp[i] = fdopen(fd, "r"); 748 fp[i] = fdopen(fd, "r");
748 } 749 }