Commit c1b9629c authored by Christian Hergert's avatar Christian Hergert
Browse files

pipeline: only clear intercept once

Fixes a warning caused by PTY_IS_INTERCEPT() being called a second time.
parent 6fe679fe
......@@ -1106,9 +1106,11 @@ ide_build_pipeline_dispose (GObject *object)
g_clear_pointer (&self->message, g_free);
g_clear_object (&self->pty);
pty_intercept_clear (&self->intercept);
fd = pty_fd_steal (&self->pty_slave);
if (PTY_IS_INTERCEPT (&self->intercept))
pty_intercept_clear (&self->intercept);
G_OBJECT_CLASS (ide_build_pipeline_parent_class)->dispose (object);
IDE_EXIT;
......
......@@ -39,8 +39,6 @@
*/
#define CHANNEL_BUFFER_SIZE (4096 * 4)
#define PTY_INTERCEPT_MAGIC (0x81723647)
#define PTY_IS_INTERCEPT(s) ((s) != NULL && (s)->magic == PTY_INTERCEPT_MAGIC)
static void _pty_intercept_side_close (pty_intercept_side_t *side);
static gboolean _pty_intercept_in_cb (GIOChannel *channel,
......
......@@ -24,6 +24,8 @@
G_BEGIN_DECLS
#define PTY_FD_INVALID (-1)
#define PTY_INTERCEPT_MAGIC (0x81723647)
#define PTY_IS_INTERCEPT(s) ((s) != NULL && (s)->magic == PTY_INTERCEPT_MAGIC)
typedef int pty_fd_t;
typedef struct _pty_intercept_t pty_intercept_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment