From: Andre Noll Date: Sat, 3 Jan 2015 17:03:27 +0000 (+0000) Subject: osl.c: Fix assertion in create_table_index(). X-Git-Tag: v0.1.3~19 X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=commitdiff_plain;h=1cb173045c9bbc707407021860a74a2dbc01af65;ds=sidebyside osl.c: Fix assertion in create_table_index(). 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. --- diff --git a/osl.c b/osl.c index 0a2863d..4569b1b 100644 --- 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);