diff options
Diffstat (limited to 'src/libbio')
-rw-r--r-- | src/libbio/bcat.c | 2 | ||||
-rw-r--r-- | src/libbio/binit.c | 8 | ||||
-rw-r--r-- | src/libbio/brdstr.c | 2 | ||||
-rw-r--r-- | src/libbio/bvprint.c | 2 | ||||
-rw-r--r-- | src/libbio/lib9.std.h | 1 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/libbio/bcat.c b/src/libbio/bcat.c index 7c9b39e9..cc8e53d8 100644 --- a/src/libbio/bcat.c +++ b/src/libbio/bcat.c @@ -14,7 +14,7 @@ bcat(Biobuf *b, char *name) fprint(2, "writing during %s: %r\n", name); } if(n < 0) - fprint(2, "reading %s: %r\n", name); + fprint(2, "reading %s: %r\n", name); } int diff --git a/src/libbio/binit.c b/src/libbio/binit.c index 8ec375ce..95a70a28 100644 --- a/src/libbio/binit.c +++ b/src/libbio/binit.c @@ -141,13 +141,15 @@ Bopen(char *name, int mode) int Bterm(Biobuf *bp) { + int ret; deinstall(bp); - Bflush(bp); + ret = Bflush(bp); if(bp->flag == Bmagic) { bp->flag = 0; - close(bp->fid); + if(close(bp->fid) < 0) + ret = -1; free(bp); } - return 0; + return ret; } diff --git a/src/libbio/brdstr.c b/src/libbio/brdstr.c index 52baf517..30d40db4 100644 --- a/src/libbio/brdstr.c +++ b/src/libbio/brdstr.c @@ -99,7 +99,7 @@ Brdstr(Biobuf *bp, int delim, int nulldelim) } ip += j; } - + /* * full buffer without finding; add to user string and continue */ diff --git a/src/libbio/bvprint.c b/src/libbio/bvprint.c index 60b105fa..0b1aaf6b 100644 --- a/src/libbio/bvprint.c +++ b/src/libbio/bvprint.c @@ -1,7 +1,7 @@ #include "lib9.h" #include <bio.h> -static int +static int fmtBflush(Fmt *f) { Biobuf *bp; diff --git a/src/libbio/lib9.std.h b/src/libbio/lib9.std.h index 180471e1..e4897023 100644 --- a/src/libbio/lib9.std.h +++ b/src/libbio/lib9.std.h @@ -23,4 +23,3 @@ typedef unsigned long long uvlong; #define seek(fd, offset, whence) lseek(fd, offset, whence) #define create(name, mode, perm) creat(name, perm) - |