[telepathy-glib/master] account{, -manager}: allow checking and preparing NULL features
Jonny Lamb
jonny.lamb at collabora.co.uk
Sat Sep 26 06:05:55 PDT 2009
NULL just means that we want to prepare the _CORE feature.
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/account-manager.c | 4 ++--
telepathy-glib/account.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index 3a9cefc..f923608 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -200,7 +200,7 @@ _tp_account_manager_check_features (TpAccountManager *self,
const GQuark *f;
TpAccountManagerFeature *feat;
- for (f = features; *f != 0; f++)
+ for (f = features; f != NULL && *f != 0; f++)
{
feat = _tp_account_manager_get_feature (self, *f);
@@ -1327,7 +1327,7 @@ tp_account_manager_prepare_async (TpAccountManager *manager,
/* In this object, there are no features which are activatable (core is
* forced on you). They'd be activated here though. */
- for (f = features; *f != 0; f++)
+ for (f = features; f != NULL && *f != 0; f++)
{
/* Only add features to requested which exist on this object and are not
* already in the list. */
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index aa7a215..35f5d5d 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -256,7 +256,7 @@ _tp_account_check_features (TpAccount *self,
const GQuark *f;
TpAccountFeature *feat;
- for (f = features; *f != 0; f++)
+ for (f = features; f != NULL && *f != 0; f++)
{
feat = _tp_account_get_feature (self, *f);
@@ -2645,7 +2645,7 @@ tp_account_prepare_async (TpAccount *account,
/* In this object, there are no features which are activatable (core is
* forced on you). They'd be activated here though. */
- for (f = features; *f != 0; f++)
+ for (f = features; f != NULL && *f != 0; f++)
{
/* Only add features to requested which exist on this object and are not
* already in the list. */
--
1.5.6.5
More information about the telepathy-commits
mailing list