[Telepathy-commits] [telepathy-salut/master] gibber-sasl-auth: fix coding style
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Mon Dec 15 04:14:10 PST 2008
---
lib/gibber/gibber-sasl-auth.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/gibber/gibber-sasl-auth.c b/lib/gibber/gibber-sasl-auth.c
index 02c055d..9053824 100644
--- a/lib/gibber/gibber-sasl-auth.c
+++ b/lib/gibber/gibber-sasl-auth.c
@@ -275,7 +275,7 @@ static gboolean
gibber_sasl_auth_has_mechanism (GSList *list, const gchar *mech) {
GSList *t;
for (t = list ; t != NULL ; t = g_slist_next (t)) {
- if (!strcmp ((gchar *)t->data, mech)) {
+ if (!strcmp ((gchar *) t->data, mech)) {
return TRUE;
}
}
@@ -385,7 +385,7 @@ digest_md5_generate_cnonce (void)
for (i = 0; i < NR; i++)
n[i] = g_random_int ();
- return g_base64_encode ((guchar *)n, sizeof (n));
+ return g_base64_encode ((guchar *) n, sizeof (n));
}
static gchar *
@@ -506,7 +506,7 @@ digest_md5_send_initial_response (GibberSaslAuth *sasl, GHashTable *challenge)
DEBUG ("Prepared response: %s", response);
- response64 = g_base64_encode ((guchar *)response, strlen (response));
+ response64 = g_base64_encode ((guchar *) response, strlen (response));
stanza = gibber_xmpp_stanza_new ("response");
gibber_xmpp_node_set_ns (stanza->node, GIBBER_XMPP_NS_SASL_AUTH);
@@ -573,7 +573,7 @@ digest_md5_handle_challenge (GibberSaslAuth *sasl, GibberXmppStanza *stanza)
if (stanza->node->content != NULL)
{
- challenge = (gchar *)g_base64_decode (stanza->node->content, &len);
+ challenge = (gchar *) g_base64_decode (stanza->node->content, &len);
DEBUG("Got digest-md5 challenge: %s", challenge);
h = digest_md5_challenge_to_hash (challenge);
g_free (challenge);
@@ -613,7 +613,7 @@ digest_md5_handle_failure (GibberSaslAuth *sasl, GibberXmppStanza *stanza)
{
/* TODO add a gibber xmpp node utility to either get the first child or
* iterate the children list */
- reason = (GibberXmppNode *)stanza->node->children->data;
+ reason = (GibberXmppNode *) stanza->node->children->data;
}
/* TODO Handle the different error cases in a different way. i.e.
* make it clear for the user if it's credentials were wrong, if the server
@@ -668,7 +668,7 @@ plain_handle_failure (GibberSaslAuth *sasl, GibberXmppStanza *stanza)
{
/* TODO add a gibber xmpp node utility to either get the first child or
* iterate the children list */
- reason = (GibberXmppNode *)stanza->node->children->data;
+ reason = (GibberXmppNode *) stanza->node->children->data;
}
/* TODO Handle the different error cases in a different way. i.e.
* make it clear for the user if it's credentials were wrong, if the server
@@ -762,7 +762,7 @@ gibber_sasl_auth_start_mechanism (GibberSaslAuth *sasl,
g_string_append (str, username);
g_string_append_c (str, '\0');
g_string_append (str, password);
- cstr = g_base64_encode ((guchar *)str->str, str->len);
+ cstr = g_base64_encode ((guchar *) str->str, str->len);
gibber_xmpp_node_set_attribute (stanza->node, "mechanism", "PLAIN");
gibber_xmpp_node_set_content (stanza->node, cstr);
--
1.5.6.5
More information about the Telepathy-commits
mailing list