aboutsummaryrefslogtreecommitdiff
path: root/editors/diff.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-06 03:05:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-06 03:05:54 +0000
commit6bef3d1d2216234454875052220ca0f477a820b4 (patch)
tree717060345370b781d3d1cde7ab4dd29304a066e8 /editors/diff.c
parent1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5 (diff)
downloadbusybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.tar.gz
busybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.tar.bz2
busybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.zip
fbset: fix buglet where we were using wrong pointer
readahead: stop using stdio.h *: style fixes
Diffstat (limited to 'editors/diff.c')
-rw-r--r--editors/diff.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/editors/diff.c b/editors/diff.c
index c158c8763..64b7daa11 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -588,7 +588,9 @@ static void check(FILE * f1, FILE * f2)
588 while (1) { 588 while (1) {
589 ctold++; 589 ctold++;
590 ctnew++; 590 ctnew++;
591 if ((c = getc(f1)) != (d = getc(f2))) { 591 c = getc(f1);
592 d = getc(f2);
593 if (c != d) {
592 J[i] = 0; 594 J[i] = 0;
593 if (c != '\n' && c != EOF) 595 if (c != '\n' && c != EOF)
594 ctold += skipline(f1); 596 ctold += skipline(f1);
@@ -668,7 +670,8 @@ static void fetch(long *f, int a, int b, FILE * lb, int ch)
668 } 670 }
669 col = 0; 671 col = 0;
670 for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) { 672 for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
671 if ((c = getc(lb)) == EOF) { 673 c = getc(lb);
674 if (c == EOF) {
672 printf("\n\\ No newline at end of file\n"); 675 printf("\n\\ No newline at end of file\n");
673 return; 676 return;
674 } 677 }