summaryrefslogtreecommitdiff
path: root/editors/joe/patches/patch-ag
blob: d237a4a7f31188c81caea4774e7207c0799f5e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ag,v 1.2 2003/04/27 17:45:31 cjep Exp $

--- ufile.c.orig	1995-01-13 17:13:16.000000000 +0000
+++ ufile.c
@@ -135,7 +135,7 @@ BW *bw;
 int cp(from,to)
 char *from, *to;
  {
- int f, g, amnt;
+ int f, g, amnt, rc;
  struct stat sbuf;
 
 #ifdef HAVEUTIME
@@ -157,8 +157,8 @@ char *from, *to;
   }
  while((amnt=read(f,stdbuf,stdsiz))>0)
   if(amnt!=write(g,stdbuf,amnt)) break;
- close(f); close(g);
- if(amnt) return -1;
+ close(f); rc = close(g);
+ if(amnt || rc) return -1;
 
 #ifdef HAVEUTIME
 #ifdef NeXT