diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-08-12 11:51:45 +0200 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-08-16 11:37:18 +0100 |
commit | 6f490c06af966758f3601ce36c23e342f356c6b9 (patch) | |
tree | 559f8937551eb05edcbd2c4aa686ad96713c2989 /src/avahi-contact.c | |
parent | e97a10ac5c84088967b3740c593372ccdbca4731 (diff) | |
download | telepathy-salut-6f490c06af966758f3601ce36c23e342f356c6b9.tar.gz |
AvahiContact: use tp_str_empty
Diffstat (limited to 'src/avahi-contact.c')
-rw-r--r-- | src/avahi-contact.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/avahi-contact.c b/src/avahi-contact.c index 9024a614..6d082da6 100644 --- a/src/avahi-contact.c +++ b/src/avahi-contact.c @@ -590,15 +590,13 @@ update_alias (SalutAvahiContact *self, const gchar *first, const gchar *last) { -#define STREMPTY(x) (x == NULL || *x == '\0') - - if (!STREMPTY(nick)) + if (!tp_str_empty (nick)) { salut_contact_change_alias (SALUT_CONTACT (self), nick); return; } - if (!STREMPTY(first) && !STREMPTY(last)) + if (!tp_str_empty (first) && !tp_str_empty (last)) { gchar *s = g_strdup_printf ("%s %s", first, last); @@ -608,24 +606,21 @@ update_alias (SalutAvahiContact *self, return; } - if (!STREMPTY(first)) + if (!tp_str_empty (first)) { salut_contact_change_alias (SALUT_CONTACT (self), first); return; } - if (!STREMPTY(last)) + if (!tp_str_empty (last)) { salut_contact_change_alias (SALUT_CONTACT (self), last); return; } salut_contact_change_alias (SALUT_CONTACT (self), NULL); - -#undef STREMPTY } - /* Returned string needs to be freed with avahi_free ! */ static char * _avahi_txt_get_keyval_with_size (AvahiStringList *txt, |