char *tok = line;
size_t tok_len = 0;
char *line_for_error;
- int ret = 0;
+ tag_parse_status_t ret = TAG_PARSE_SUCCESS;
chomp_newline (line);
line_for_error = talloc_strdup (ctx, line);
if (line_for_error == NULL) {
fprintf (stderr, "Error: out of memory\n");
- return -1;
+ return TAG_PARSE_OUT_OF_MEMORY;
}
/* remove leading space */
goto DONE;
}
- if (tag_op_list_append (ctx, tag_ops, tag, remove)) {
+ if (tag_op_list_append (tag_ops, tag, remove)) {
ret = line_error (TAG_PARSE_OUT_OF_MEMORY, line_for_error,
"aborting");
goto DONE;
list->size = TAG_OP_LIST_INITIAL_SIZE;
list->count = 0;
- list->ops = talloc_array (ctx, tag_operation_t, list->size);
+ list->ops = talloc_array (list, tag_operation_t, list->size);
if (list->ops == NULL)
return NULL;
int
-tag_op_list_append (void *ctx,
- tag_op_list_t *list,
+tag_op_list_append (tag_op_list_t *list,
const char *tag,
notmuch_bool_t remove)
{
if (list->count == list->size) {
list->size *= 2;
- list->ops = talloc_realloc (ctx, list->ops, tag_operation_t,
+ list->ops = talloc_realloc (list, list->ops, tag_operation_t,
list->size);
if (list->ops == NULL) {
fprintf (stderr, "Out of memory.\n");