Description:
The use of the operator '=' should follow this style:
foo= "ok";
but not this:
foo = "bad";
Example of violations:
ma_check.c: int success = mlockall(MCL_CURRENT); /* or plock(DATLOCK); */
ma_check.c: share->kfile.file = -1;
ma_create.c: share.state.dellink = HA_OFFSET_ERROR;
ma_create.c: share.base.keystart = share.state.state.key_file_length=
ma_create.c: share->bitmap.file.file = dfile;
ma_dynrec.c: info->s->state.dellink = filepos;
ma_dynrec.c: if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
ma_dynrec.c: *packpos++ = (uchar) flag;
ma_dynrec.c: if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
ma_dynrec.c: if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL &&
ma_info.c: x->filenr = info->dfile.file;
ma_info.c: x->options = share->options;
ma_info.c: x->data_file_name = share->data_file_name.str;
ma_info.c: x->index_file_name = share->index_file_name.str;
ma_info.c: x->data_file_type = share->data_file_type;
etc.
Not every occurence of " = " is a violation since some might be located
inside comments, but still: the result of
storage/maria> grep " = " *.c | wc -l
is currently 178, in mysql-6.0
How to repeat:
Read the code, read the coding style.