aboutsummaryrefslogtreecommitdiff
path: root/serial
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-06-30 16:02:28 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-06-30 16:02:28 +0300
commit124b32451fe844581f23b4a9ca859b888ddbf95e (patch)
treece771afeb763b8f5a6132f4d7b47ce943b2d6131 /serial
parent29a9efb1ba965eb9fbe90c727907886273108e8d (diff)
downloadbluez-124b32451fe844581f23b4a9ca859b888ddbf95e.tar.gz
Fix open() error check
Diffstat (limited to 'serial')
-rw-r--r--serial/proxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/serial/proxy.c b/serial/proxy.c
index c0a4b162..63f08f6a 100644
--- a/serial/proxy.c
+++ b/serial/proxy.c
@@ -786,7 +786,7 @@ static void proxy_path_unregister(gpointer data)
/* Restore the initial TTY configuration */
sk = open(prx->address, O_RDWR | O_NOCTTY);
- if (sk) {
+ if (sk >= 0) {
tcsetattr(sk, TCSAFLUSH, &prx->sys_ti);
close(sk);
}