1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Elliott <pelliott@ualberta.ca>
Date: Sat, 11 Feb 2023 15:17:27 -0700
Subject: [PATCH] Remove call to open_memstream(3) from wl_closure_print
---
src/connection.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/connection.c b/src/connection.c
index bf976762df7d31205a4945cf6df0963c5f27c70a..1adf30fdd2b5e211dbbe69607f4c97eff182d99b 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1273,12 +1273,8 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
unsigned int time;
uint32_t nval;
FILE *f;
- char *buffer;
- size_t buffer_length;
- f = open_memstream(&buffer, &buffer_length);
- if (f == NULL)
- return;
+ f = stderr;
clock_gettime(CLOCK_REALTIME, &tp);
time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
@@ -1354,11 +1350,6 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
}
fprintf(f, ")\n");
-
- if (fclose(f) == 0) {
- fprintf(stderr, "%s", buffer);
- free(buffer);
- }
}
static int
|