]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Remove buffering on malloc log file
authorSimon Tatham <anakin@pobox.com>
Fri, 15 Jan 1999 11:27:36 +0000 (11:27 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 15 Jan 1999 11:27:36 +0000 (11:27 +0000)
[originally from svn r13]

misc.c

diff --git a/misc.c b/misc.c
index 370eea07a1a5ae62a12ec3c7e959c541ad3085b0..6bb09c535d612db0cae34efe8752af49c6e3a9fb 100644 (file)
--- a/misc.c
+++ b/misc.c
 static FILE *fp = NULL;
 
 void mlog(char *file, int line) {
-    if (!fp)
+    if (!fp) {
        fp = fopen("putty_mem.log", "w");
+       setvbuf(fp, NULL, _IONBF, BUFSIZ);
+    }
     if (fp)
        fprintf (fp, "%s:%d: ", file, line);
 }