Linux bluetooth development
 help / color / mirror / Atom feed
From: "Elvis Pfützenreuter" <epx@signove.com>
To: linux-bluetooth@vger.kernel.org
Cc: epx@signove.com
Subject: [PATCH 1/2] Fix fd comparison
Date: Mon, 25 Oct 2010 14:28:43 -0200	[thread overview]
Message-ID: <1288024124-24492-1-git-send-email-epx@signove.com> (raw)

---
 health/hdp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/health/hdp.c b/health/hdp.c
index fd3b1ca..eb27613 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -477,7 +477,7 @@ static void hdp_mdl_reconn_cb(struct mcap_mdl *mdl, GError *err, gpointer data)
 	}
 
 	fd = mcap_mdl_get_fd(dc_data->hdp_chann->mdl);
-	if (fd <= 0)
+	if (fd < 0)
 		reply = g_dbus_create_error(dc_data->msg,
 						ERROR_INTERFACE ".HealthError",
 						"Cannot get file descriptor");
@@ -568,7 +568,7 @@ static DBusMessage *channel_acquire_continue(struct hdp_tmp_dc_data *data,
 	}
 
 	fd = mcap_mdl_get_fd(data->hdp_chann->mdl);
-	if (fd > 0)
+	if (fd >= 0)
 		return g_dbus_create_reply(data->msg, DBUS_TYPE_UNIX_FD, &fd,
 							DBUS_TYPE_INVALID);
 
-- 
1.7.0.4


             reply	other threads:[~2010-10-25 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 16:28 Elvis Pfützenreuter [this message]
2010-10-25 16:28 ` [PATCH 2/2] Fix coding style and comment Elvis Pfützenreuter
2010-10-25 18:50   ` Johan Hedberg
2010-10-25 18:49 ` [PATCH 1/2] Fix fd comparison Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288024124-24492-1-git-send-email-epx@signove.com \
    --to=epx@signove.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox