+ uint32_t iid, const char *name, uint32_t name_len, bool is_unique,
+ struct ExprList *expr_list, u8 idx_type)
+{
+ struct space_def *space_def = table->def;
+ size_t sql_size = 0;
+ struct index_opts opts;
+ index_opts_create(&opts);
+ index->def = NULL;
+ opts.is_unique = is_unique;
+ int rc = -1;
You don’t use this variable and in the end just reassign it:
+ if (index->def == NULL)
+ goto tnt_error;
+ rc = 0;
+cleanup:
+ if (key_def != NULL)
+ key_def_delete(key_def);
+ return rc;