int mutt_dump_variables(bool hide_sensitive)
{
char cmd[256];
-
- struct Buffer err, token;
-
- mutt_buffer_init(&err);
- mutt_buffer_init(&token);
-
- err.dsize = 256;
- err.data = mutt_mem_malloc(err.dsize);
+ struct Buffer *err = mutt_buffer_pool_get();
+ struct Buffer *token = mutt_buffer_pool_get();
for (int i = 0; MuttVars[i].name; i++)
{
continue;
}
snprintf(cmd, sizeof(cmd), "set ?%s\n", MuttVars[i].name);
- if (mutt_parse_rc_line(cmd, &token, &err) == MUTT_CMD_ERROR)
+ if (mutt_parse_rc_line(cmd, token, err) == MUTT_CMD_ERROR)
{
- mutt_message("%s", err.data);
- FREE(&token.data);
- FREE(&err.data);
+ mutt_message("%s", mutt_b2s(err));
+ mutt_buffer_pool_release(&token);
+ mutt_buffer_pool_release(&err);
return 1; // TEST17: can't test
}
- mutt_message("%s", err.data);
+ mutt_message("%s", mutt_b2s(err));
}
- FREE(&token.data);
- FREE(&err.data);
+ mutt_buffer_pool_release(&token);
+ mutt_buffer_pool_release(&err);
return 0;
}