diff options
| author | Charles.Forsyth <devnull@localhost> | 2008-01-16 01:19:38 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2008-01-16 01:19:38 +0000 |
| commit | ca1042d3d05e5e9b2b5094b04197c96ec3b34bfe (patch) | |
| tree | 6a2cb733509e5a3692efa952e1c3bc5503c25355 /appl/cmd/diff.b | |
| parent | e84ac69296d2bd901d9d5dba59a1873fc6fb7cc1 (diff) | |
20080116-0125
Diffstat (limited to 'appl/cmd/diff.b')
| -rw-r--r-- | appl/cmd/diff.b | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/appl/cmd/diff.b b/appl/cmd/diff.b index 4ef3ab32..3847e9e9 100644 --- a/appl/cmd/diff.b +++ b/appl/cmd/diff.b @@ -203,7 +203,6 @@ init(nil: ref Draw->Context, args: list of string) sort(a : array of line, n : int) { w : line; - j1:=0; m := 0; for (i := 1; i <= n; i *= 2) m = 2*i - 1; @@ -791,12 +790,9 @@ statfile(file : string) : (string,Sys->Dir) { (ret,sb):=sys->stat(file); if (ret==-1) { - if (file == "-") { - (ret,sb)= sys->fstat(sys->fildes(0)); - if (ret == -1) { - error(sys->sprint("cannot stat %s: %r", file)); - return (nil,sb); - } + if (file != "-" || sys->fstat(sys->fildes(0)).t0 == -1){ + error(sys->sprint("cannot stat %s: %r", file)); + return (nil,sb); } (file, sb) = mktmpfile(sys->fildes(0)); } |
