dirfs - Lower debug level to 0
[dragonfly.git] / usr.bin / vi / patches / ex_write.c.patch
1 /* $DragonFly: src/usr.bin/vi/patches/ex_write.c.patch,v 1.1 2006/06/24 00:04:18 sephe Exp $ */
2 --- ex_write.c  2006-06-23 23:08:03.000000000 +0800
3 +++ ex_write.c  2006-06-23 23:08:54.000000000 +0800
4 @@ -352,14 +352,17 @@
5             S_ISREG(sb.st_mode) && fsync(fileno(fp)))
6                 goto err;
7  
8 -       if (fclose(fp))
9 +       if (fclose(fp)) {
10 +               fp = NULL;
11                 goto err;
12 +       }
13  
14         rval = 0;
15         if (0) {
16  err:           if (!F_ISSET(sp->ep, F_MULTILOCK))
17                         msgq_str(sp, M_SYSERR, name, "%s");
18 -               (void)fclose(fp);
19 +               if (fp != NULL)
20 +                       fclose(fp);
21                 rval = 1;
22         }
23