diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:24:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:37:20 +0800 |
commit | 8a186c3588d3598857c36e2122fa68d01eba30fd (patch) | |
tree | 731078659d4e04af8346c5ca68512d8537b3707a /smime | |
parent | 2bf3460cd3eb0853a1d10a6e36f5091898a5533f (diff) | |
download | gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.gz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.zst gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.zip |
Coding style cleanups.
Diffstat (limited to 'smime')
-rw-r--r-- | smime/gui/ca-trust-dialog.c | 2 | ||||
-rw-r--r-- | smime/gui/cert-trust-dialog.c | 4 | ||||
-rw-r--r-- | smime/gui/certificate-manager.c | 2 | ||||
-rw-r--r-- | smime/gui/certificate-viewer.c | 4 | ||||
-rw-r--r-- | smime/gui/e-cert-selector.c | 14 | ||||
-rw-r--r-- | smime/lib/e-asn1-object.c | 6 | ||||
-rw-r--r-- | smime/lib/e-cert-db.c | 26 | ||||
-rw-r--r-- | smime/lib/e-cert.c | 2 | ||||
-rw-r--r-- | smime/lib/e-pkcs12.c | 4 |
9 files changed, 32 insertions, 32 deletions
diff --git a/smime/gui/ca-trust-dialog.c b/smime/gui/ca-trust-dialog.c index a8169dd2e7..887af30277 100644 --- a/smime/gui/ca-trust-dialog.c +++ b/smime/gui/ca-trust-dialog.c @@ -102,7 +102,7 @@ ca_trust_dialog_show (ECert *cert, gboolean importing) w = e_builder_get_widget(ctd_data->builder, "ca-trust-label"); txt = g_strdup_printf(_("Certificate '%s' is a CA certificate.\n\nEdit trust settings:"), e_cert_get_cn(cert)); - gtk_label_set_text ((GtkLabel *)w, txt); + gtk_label_set_text ((GtkLabel *) w, txt); g_free (txt); g_signal_connect (ctd_data->dialog, "response", G_CALLBACK (catd_response), ctd_data); diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c index 4f13ff2b74..7c76b01b88 100644 --- a/smime/gui/cert-trust-dialog.c +++ b/smime/gui/cert-trust-dialog.c @@ -140,11 +140,11 @@ cert_trust_dialog_show (ECert *cert) icert = e_cert_get_internal_cert (ctd_data->cacert); if (e_cert_trust_has_trusted_ca (icert->trust, FALSE, TRUE, FALSE)) - gtk_label_set_text ((GtkLabel *)ctd_data->label, + gtk_label_set_text ((GtkLabel *) ctd_data->label, _("Because you trust the certificate authority that issued this certificate, " "then you trust the authenticity of this certificate unless otherwise indicated here")); else - gtk_label_set_text ((GtkLabel *)ctd_data->label, + gtk_label_set_text ((GtkLabel *) ctd_data->label, _("Because you do not trust the certificate authority that issued this certificate, " "then you do not trust the authenticity of this certificate unless otherwise indicated here")); diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 624059c902..4d95a67364 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -1055,7 +1055,7 @@ load_certs (CertificateManagerData *cfm, for (node = CERT_LIST_HEAD (certList); !CERT_LIST_END (node, certList); node = CERT_LIST_NEXT (node)) { - ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*)node->cert)); + ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*) node->cert)); ECertType ct = e_cert_get_cert_type (cert); /* show everything else in a contact tab */ diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c index c78bd77a75..78a160b707 100644 --- a/smime/gui/certificate-viewer.c +++ b/smime/gui/certificate-viewer.c @@ -49,7 +49,7 @@ free_data (gpointer data, GObject *where_the_object_was) { CertificateViewerData *cvm = data; - g_list_foreach (cvm->cert_chain, (GFunc)g_object_unref, NULL); + g_list_foreach (cvm->cert_chain, (GFunc) g_object_unref, NULL); g_list_free (cvm->cert_chain); g_object_unref (cvm->builder); @@ -169,7 +169,7 @@ populate_fields_tree (CertificateViewerData *cvm_data, EASN1Object *asn1, GtkTre populate_fields_tree (cvm_data, subasn1, &new_iter); } } - g_list_foreach (children, (GFunc)g_object_unref, NULL); + g_list_foreach (children, (GFunc) g_object_unref, NULL); g_list_free (children); } } diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index f20baa582c..c88f044e9b 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -91,7 +91,7 @@ e_cert_selector_response (GtkDialog *dialog, gint button) switch (button) { case GTK_RESPONSE_OK: - node = ecs_find_current ((ECertSelector *)dialog); + node = ecs_find_current ((ECertSelector *) dialog); break; default: node = NULL; @@ -117,7 +117,7 @@ ecs_cert_changed (GtkWidget *w, ECertSelector *ecs) g_string_append_printf(text, _("Issued by:\n Subject: %s\n"), node->cert->issuerName); } - buffer = gtk_text_view_get_buffer ((GtkTextView *)p->description); + buffer = gtk_text_view_get_buffer ((GtkTextView *) p->description); gtk_text_buffer_set_text (buffer, text->str, text->len); g_string_free (text, TRUE); } @@ -218,7 +218,7 @@ e_cert_selector_new (gint type, const gchar *currentid) static void e_cert_selector_init (ECertSelector *ecs) { - gtk_dialog_add_buttons ((GtkDialog *)ecs, + gtk_dialog_add_buttons ((GtkDialog *) ecs, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); @@ -228,21 +228,21 @@ e_cert_selector_init (ECertSelector *ecs) static void e_cert_selector_finalise (GObject *o) { - ECertSelector *ecs = (ECertSelector *)o; + ECertSelector *ecs = (ECertSelector *) o; if (ecs->priv->certlist) CERT_DestroyCertList (ecs->priv->certlist); g_free (ecs->priv); - ((GObjectClass *)e_cert_selector_parent_class)->finalize (o); + ((GObjectClass *) e_cert_selector_parent_class)->finalize (o); } static void e_cert_selector_class_init (ECertSelectorClass *klass) { - ((GObjectClass *)klass)->finalize = e_cert_selector_finalise; - ((GtkDialogClass *)klass)->response = e_cert_selector_response; + ((GObjectClass *) klass)->finalize = e_cert_selector_finalise; + ((GtkDialogClass *) klass)->response = e_cert_selector_response; ecs_signals[ECS_SELECTED] = g_signal_new("selected", diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c index d858a53579..eb8863f46e 100644 --- a/smime/lib/e-asn1-object.c +++ b/smime/lib/e-asn1-object.c @@ -76,7 +76,7 @@ e_asn1_object_dispose (GObject *object) if (obj->priv->value) g_free (obj->priv->value); - g_list_foreach (obj->priv->children, (GFunc)g_object_unref, NULL); + g_list_foreach (obj->priv->children, (GFunc) g_object_unref, NULL); g_list_free (obj->priv->children); g_free (obj->priv); @@ -238,7 +238,7 @@ build_from_der (EASN1Object *parent, gchar *data, gchar *end) return FALSE; } data++; - len = get_der_item_length ((guchar *)data, (guchar *)end, &bytesUsed, &indefinite); + len = get_der_item_length ((guchar *) data, (guchar *) end, &bytesUsed, &indefinite); data += bytesUsed; if ((len < 0) || ((data+len) > end)) return FALSE; @@ -336,7 +336,7 @@ e_asn1_object_get_children (EASN1Object *obj) { GList *children = g_list_copy (obj->priv->children); - g_list_foreach (children, (GFunc)g_object_ref, NULL); + g_list_foreach (children, (GFunc) g_object_ref, NULL); return children; } diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index 4b70b1118d..a5fbbbed23 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -321,7 +321,7 @@ collect_certs (gpointer arg, SECItem **certs, gint numcerts) SECItem *cert; SECStatus rv; - collectArgs = (CERTDERCerts *)arg; + collectArgs = (CERTDERCerts *) arg; collectArgs->numcerts = numcerts; collectArgs->rawCerts = (SECItem *) PORT_ArenaZAlloc ( @@ -349,7 +349,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena, { /*nsNSSShutDownPreventionLock locker;*/ CERTDERCerts *collectArgs = - (CERTDERCerts *)PORT_ArenaZAlloc (arena, sizeof (CERTDERCerts)); + (CERTDERCerts *) PORT_ArenaZAlloc (arena, sizeof (CERTDERCerts)); SECStatus sec_rv; if (!collectArgs) @@ -358,7 +358,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena, collectArgs->arena = arena; sec_rv = CERT_DecodeCertPackage (data, length, collect_certs, - (gpointer)collectArgs); + (gpointer) collectArgs); if (sec_rv != SECSuccess) return NULL; @@ -644,9 +644,9 @@ e_cert_db_find_cert_by_nickname (ECertDB *certdb, CERTCertificate *cert = NULL; /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Getting \"%s\"\n", asciiname));*/ - cert = PK11_FindCertFromNickname ((gchar *)nickname, NULL); + cert = PK11_FindCertFromNickname ((gchar *) nickname, NULL); if (!cert) { - cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (), (gchar *)nickname); + cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (), (gchar *) nickname); } if (cert) { @@ -679,7 +679,7 @@ e_cert_db_find_cert_by_key (ECertDB *certdb, } dummy = NSSBase64_DecodeBuffer (NULL, &keyItem, db_key, - (PRUint32)PL_strlen (db_key)); + (PRUint32) PL_strlen (db_key)); /* someday maybe we can speed up the search using the moduleID and slotID*/ moduleID = NS_NSS_GET_LONG (keyItem.data); @@ -880,7 +880,7 @@ handle_ca_cert_download (ECertDB *cert_db, GList *certs, GError **error) return FALSE; } - der.data = (guchar *)raw_der; + der.data = (guchar *) raw_der; { /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Creating temp cert\n"));*/ @@ -1074,10 +1074,10 @@ e_cert_db_import_certs (ECertDB *certdb, SECItem *currItem = &certCollection->rawCerts[i]; ECert *cert; - cert = e_cert_new_from_der ((gchar *)currItem->data, currItem->len); + cert = e_cert_new_from_der ((gchar *) currItem->data, currItem->len); if (!cert) { set_nss_error (error); - g_list_foreach (certs, (GFunc)g_object_unref, NULL); + g_list_foreach (certs, (GFunc) g_object_unref, NULL); g_list_free (certs); PORT_FreeArena (arena, PR_FALSE); return FALSE; @@ -1109,7 +1109,7 @@ e_cert_db_import_certs (ECertDB *certdb, rv = FALSE; } - g_list_foreach (certs, (GFunc)g_object_unref, NULL); + g_list_foreach (certs, (GFunc) g_object_unref, NULL); g_list_free (certs); PORT_FreeArena (arena, PR_FALSE); return rv; @@ -1138,7 +1138,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), certCollection->rawCerts, - (gchar *)NULL, PR_FALSE, PR_TRUE); + (gchar *) NULL, PR_FALSE, PR_TRUE); if (!cert) { set_nss_error (error); rv = FALSE; @@ -1172,7 +1172,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, SECItem *currItem = &certCollection->rawCerts[i]; ECert *cert; - cert = e_cert_new_from_der ((gchar *)currItem->data, currItem->len); + cert = e_cert_new_from_der ((gchar *) currItem->data, currItem->len); if (cert) *imported_certs = g_slist_prepend (*imported_certs, cert); } @@ -1342,7 +1342,7 @@ e_cert_db_import_user_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), collectArgs->rawCerts, - (gchar *)NULL, PR_FALSE, PR_TRUE); + (gchar *) NULL, PR_FALSE, PR_TRUE); if (!cert) { set_nss_error (error); goto loser; diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index a7605a42ce..e4e32d4948 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -1032,7 +1032,7 @@ process_name (CERTName *name, gchar **value) return FALSE; } - avavalue = g_string_new_len ((gchar *)decodeItem->data, decodeItem->len); + avavalue = g_string_new_len ((gchar *) decodeItem->data, decodeItem->len); SECITEM_FreeItem (decodeItem, PR_TRUE); diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index 6b7b7ae63c..4cc4fb90d1 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -402,8 +402,8 @@ nickname_collision (SECItem *oldNick, PRBool *cancel, gpointer wincx) new_nick = PR_Malloc (sizeof (SECItem)); new_nick->type = siAsciiString; - new_nick->data = (guchar *)nickname; - new_nick->len = strlen ((gchar *)new_nick->data); + new_nick->data = (guchar *) nickname; + new_nick->len = strlen ((gchar *) new_nick->data); return new_nick; } |