Skip to content

Commit

Permalink
imap-send.c: remove struct message
Browse files Browse the repository at this point in the history
It was never used.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Jan 15, 2013
1 parent 2fbd211 commit e6de375
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,10 @@ typedef void *SSL;
#include <openssl/hmac.h>
#endif

/* For message->status */
#define M_RECENT (1<<0) /* unsyncable flag; maildir_* depend on this being 1<<0 */
#define M_DEAD (1<<1) /* expunged */
#define M_FLAGS (1<<2) /* flags fetched */

struct message {
struct message *next;
size_t size; /* zero implies "not fetched" */
int uid;
unsigned char flags, status;
};

struct store {
/* currently open mailbox */
const char *name; /* foreign! maybe preset? */
char *path; /* own */
struct message *msgs; /* own */
int uidvalidity;
unsigned char opts; /* maybe preset? */
/* note that the following do _not_ reflect stats from msgs, but mailbox totals */
Expand All @@ -74,8 +61,6 @@ static void imap_warn(const char *, ...);

static char *next_arg(char **);

static void free_generic_messages(struct message *);

__attribute__((format (printf, 3, 4)))
static int nfsnprintf(char *buf, int blen, const char *fmt, ...);

Expand Down Expand Up @@ -447,16 +432,6 @@ static char *next_arg(char **s)
return ret;
}

static void free_generic_messages(struct message *msgs)
{
struct message *tmsg;

for (; msgs; msgs = tmsg) {
tmsg = msgs->next;
free(msgs);
}
}

static int nfsnprintf(char *buf, int blen, const char *fmt, ...)
{
int ret;
Expand Down Expand Up @@ -914,7 +889,6 @@ static void imap_close_server(struct imap_store *ictx)
static void imap_close_store(struct store *ctx)
{
imap_close_server((struct imap_store *)ctx);
free_generic_messages(ctx->msgs);
free(ctx);
}

Expand Down

0 comments on commit e6de375

Please sign in to comment.