*/
void pop_logout(struct Context *ctx)
{
- int ret = 0;
- char buf[LONG_STRING];
struct PopData *pop_data = (struct PopData *) ctx->data;
if (pop_data->status == POP_CONNECTED)
{
+ int ret = 0;
+ char buf[LONG_STRING];
mutt_message(_("Closing connection to POP server..."));
if (ctx->readonly)
int (*funct)(char *, void *), void *data)
{
char buf[LONG_STRING];
- char *inbuf = NULL;
- char *p = NULL;
- int ret, chunk = 0;
long pos = 0;
size_t lenbuf = 0;
mutt_str_strfcpy(buf, query, sizeof(buf));
- ret = pop_query(pop_data, buf, sizeof(buf));
+ int ret = pop_query(pop_data, buf, sizeof(buf));
if (ret < 0)
return ret;
- inbuf = mutt_mem_malloc(sizeof(buf));
+ char *inbuf = mutt_mem_malloc(sizeof(buf));
while (true)
{
- chunk = mutt_socket_readln_d(buf, sizeof(buf), pop_data->conn, MUTT_SOCK_LOG_HDR);
+ const int chunk =
+ mutt_socket_readln_d(buf, sizeof(buf), pop_data->conn, MUTT_SOCK_LOG_HDR);
if (chunk < 0)
{
pop_data->status = POP_DISCONNECTED;
break;
}
- p = buf;
+ char *p = buf;
if (!lenbuf && buf[0] == '.')
{
if (buf[1] != '.')
*/
int pop_reconnect(struct Context *ctx)
{
- int ret;
struct PopData *pop_data = (struct PopData *) ctx->data;
- struct Progress progressbar;
if (pop_data->status == POP_CONNECTED)
return 0;
{
mutt_socket_close(pop_data->conn);
- ret = pop_open_connection(pop_data);
+ int ret = pop_open_connection(pop_data);
if (ret == 0)
{
+ struct Progress progressbar;
mutt_progress_init(&progressbar, _("Verifying message indexes..."),
MUTT_PROGRESS_SIZE, NetInc, 0);