diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-22 20:57:50 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-22 20:57:50 +0100 |
commit | bd76057e8c5ac7f97455f1708a8bb4d0dbb1841b (patch) | |
tree | 8e904df009ca6a326f87d9f94fdf7fe902e1c8ef /src/strbuf.c | |
parent | Move C and Scheme code into subdirs. (diff) | |
download | calp-bd76057e8c5ac7f97455f1708a8bb4d0dbb1841b.tar.gz calp-bd76057e8c5ac7f97455f1708a8bb4d0dbb1841b.tar.xz |
Fix errors shown by scan-build.
Diffstat (limited to '')
-rw-r--r-- | src/strbuf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strbuf.c b/src/strbuf.c index 0e56468b..c7e3f2b5 100644 --- a/src/strbuf.c +++ b/src/strbuf.c @@ -86,10 +86,10 @@ int strbuf_cmp(strbuf* a, strbuf* b) { b == NULL || b->alloc == 0) { ERR("a or b not alloced"); - // return -1; + return -1; + } else { + return strncmp(a->mem, b->mem, a->len); } - - return strncmp(a->mem, b->mem, a->len); } int strbuf_c(strbuf* a, const char* b) { |