[vte/vte-0-40] pty: More correct assertion



commit e332692fa0a460ff0897d54dcd20fe2945d618f9
Author: Christian Persch <chpe gnome org>
Date:   Tue Mar 24 14:58:29 2015 +0100

    pty: More correct assertion
    
    Unlikely this is a problem, but was pointed out in
    https://bugzilla.gnome.org/show_bug.cgi?id=746667
    
    (cherry picked from commit 3b1a3ce742c8dcbb58d0d434f82758d5156db9dc)

 src/pty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/pty.c b/src/pty.c
index 1b6966d..7df3907 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -1338,7 +1338,7 @@ vte_pty_set_utf8(VtePty *pty,
         g_return_val_if_fail(VTE_IS_PTY(pty), FALSE);
 
         priv = pty->priv;
-        g_return_val_if_fail (priv->pty_fd > 0, FALSE);
+        g_return_val_if_fail (priv->pty_fd != -1, FALSE);
 
         if (tcgetattr(priv->pty_fd, &tio) == -1) {
                 int errsv = errno;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]