tdb: Fix Coverity ID 2192: NO_EFFECT
authorVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 19:43:53 +0000 (21:43 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 20:22:12 +0000 (22:22 +0200)
(ret < 0) can never be true

lib/tdb/common/tdb.c

index a28e8837c86359950fd2228033e1476d950cbd6b..66be555a067aa5c2db3d8a3671c215acaf07ba56 100644 (file)
@@ -993,7 +993,7 @@ _PUBLIC_ int tdb_repack(struct tdb_context *tdb)
 bool tdb_write_all(int fd, const void *buf, size_t count)
 {
        while (count) {
 bool tdb_write_all(int fd, const void *buf, size_t count)
 {
        while (count) {
-               size_t ret;
+               ssize_t ret;
                ret = write(fd, buf, count);
                if (ret < 0)
                        return false;
                ret = write(fd, buf, count);
                if (ret < 0)
                        return false;