Code

utils strbuf: Fixed a wrong assertion.
authorSebastian Harl <sh@tokkee.org>
Thu, 5 Sep 2013 16:27:10 +0000 (18:27 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 5 Sep 2013 16:27:10 +0000 (18:27 +0200)
src/utils/strbuf.c

index c8e7e633a27452ade2e8bdb85f078cb542e9e63f..7c24b3a8a75733382274d3f34f4ea46a46283f80 100644 (file)
@@ -196,7 +196,7 @@ sdb_strbuf_chomp(sdb_strbuf_t *strbuf)
        if (! strbuf)
                return -1;
 
-       assert(strbuf->size || (strbuf->pos < strbuf->size));
+       assert((!strbuf->size) || (strbuf->pos < strbuf->size));
        assert(strbuf->pos <= strbuf->size);
 
        while ((strbuf->pos > 0)