mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 05:22:47 -05:00
Remove buffering on malloc log file
[originally from svn r13]
This commit is contained in:
4
misc.c
4
misc.c
@ -13,8 +13,10 @@
|
|||||||
static FILE *fp = NULL;
|
static FILE *fp = NULL;
|
||||||
|
|
||||||
void mlog(char *file, int line) {
|
void mlog(char *file, int line) {
|
||||||
if (!fp)
|
if (!fp) {
|
||||||
fp = fopen("putty_mem.log", "w");
|
fp = fopen("putty_mem.log", "w");
|
||||||
|
setvbuf(fp, NULL, _IONBF, BUFSIZ);
|
||||||
|
}
|
||||||
if (fp)
|
if (fp)
|
||||||
fprintf (fp, "%s:%d: ", file, line);
|
fprintf (fp, "%s:%d: ", file, line);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user