projects
/
osl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c0b329
)
osl.c: Fix assertion in create_table_index().
author
Andre Noll
<maan@tuebingen.mpg.de>
Sat, 3 Jan 2015 17:03:27 +0000
(17:03 +0000)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Wed, 18 Feb 2015 14:08:57 +0000
(15:08 +0100)
Classic "=" vs. "==" bug. Since offset is positive, and not used any
more after the assert statement, the line has always been a no-op.
Found by cppcheck.
osl.c
patch
|
blob
|
history
diff --git
a/osl.c
b/osl.c
index 0a2863dd2a7e3d48463448bca426693b391d6629..4569b1bcf4810e1533c8283f1e72ae06d6f858e8 100644
(file)
--- a/
osl.c
+++ b/
osl.c
@@
-516,7
+516,7
@@
static int create_table_index(struct osl_table *t)
strcpy(buf + offset + IDX_CD_NAME, cd->name);
offset += index_column_description_size(cd->name);
}
- assert(offset = size);
+ assert(offset =
=
size);
filename = index_filename(t->desc);
if (filename)
ret = write_file(filename, buf, size);