mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Remove buffering on malloc log file
[originally from svn r13]
This commit is contained in:
parent
60ab6a5d82
commit
b78e127f7c
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user