Code

Reformat ctype.c
[git.git] / imap-send.c
index af7e08c0943ada9a650f80fd5b5fc1df23c04b88..c3fa0df855395f08a53c8619af50d28a478bbb3d 100644 (file)
@@ -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)