]> mj.ucw.cz Git - libucw.git/blobdiff - lib/carefulio.c
simple fastbuf on memory pools
[libucw.git] / lib / carefulio.c
index 7bfeee9b80e8c47aa4d49c983e8f15517df6b9f6..7bfbc784d83c1e46b2bc211a0eaa9c26bb8184c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Sherlock Library -- Careful Read/Write
+ *     UCW Library -- Careful Read/Write
  *
  *     (c) 2004 Martin Mares <mj@ucw.cz>
  *
@@ -40,7 +40,7 @@ careful_write(int fd, void *buf, int len)
   while (len)
     {
       int l = write(fd, pos, len);
-      if (l <= 0)
+      if (l < 0)
        return -1;
       if (!l)
        return 0;