X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=imap-send.c;h=c3fa0df855395f08a53c8619af50d28a478bbb3d;hb=c841aa8b903200f5d7830c7c4ab8d62b5ef44c5c;hp=af7e08c0943ada9a650f80fd5b5fc1df23c04b88;hpb=c4f6a48969b33e7fec8fce592e38a60849782d2a;p=git.git diff --git a/imap-send.c b/imap-send.c index af7e08c09..c3fa0df85 100644 --- a/imap-send.c +++ b/imap-send.c @@ -115,9 +115,9 @@ static int nfvasprintf(char **strp, const char *fmt, va_list ap) len = vsnprintf(tmp, sizeof(tmp), fmt, ap); if (len < 0) - die("Fatal: Out of memory\n"); + die("Fatal: Out of memory"); if (len >= sizeof(tmp)) - die("imap command overflow !\n"); + die("imap command overflow!"); *strp = xmemdupz(tmp, len); return len; } @@ -482,7 +482,7 @@ static int nfsnprintf(char *buf, int blen, const char *fmt, ...) va_start(va, fmt); if (blen <= 0 || (unsigned)(ret = vsnprintf(buf, blen, fmt, va)) >= (unsigned)blen) - die("Fatal: buffer too small. Please report a bug.\n"); + die("Fatal: buffer too small. Please report a bug."); va_end(va); return ret; } @@ -1266,10 +1266,9 @@ static int imap_store_msg(struct store *gctx, struct msg_data *data, int *uid) static int read_message(FILE *f, struct msg_data *msg) { - struct strbuf buf; + struct strbuf buf = STRBUF_INIT; memset(msg, 0, sizeof(*msg)); - strbuf_init(&buf, 0); do { if (strbuf_fread(&buf, CHUNKSIZE, f) <= 0)