Mercurial > pidgin
comparison libpurple/certificate.c @ 24270:e265e7066598
Fix a printf("%s", NULL). Fixes #7289.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 20 Oct 2008 00:55:11 +0000 |
parents | 11f98b1e605b |
children | d9e3434d6416 |
comparison
equal
deleted
inserted
replaced
24269:d37bff820b2d | 24270:e265e7066598 |
---|---|
135 } | 135 } |
136 | 136 |
137 GList * | 137 GList * |
138 purple_certificate_copy_list(GList *crt_list) | 138 purple_certificate_copy_list(GList *crt_list) |
139 { | 139 { |
140 GList *new, *l; | 140 GList *new_l, *l; |
141 | 141 |
142 /* First, make a shallow copy of the list */ | 142 /* First, make a shallow copy of the list */ |
143 new = g_list_copy(crt_list); | 143 new_l = g_list_copy(crt_list); |
144 | 144 |
145 /* Now go through and actually duplicate each certificate */ | 145 /* Now go through and actually duplicate each certificate */ |
146 for (l = new; l; l = l->next) { | 146 for (l = new_l; l; l = l->next) { |
147 l->data = purple_certificate_copy(l->data); | 147 l->data = purple_certificate_copy(l->data); |
148 } | 148 } |
149 | 149 |
150 return new; | 150 return new_l; |
151 } | 151 } |
152 | 152 |
153 void | 153 void |
154 purple_certificate_destroy (PurpleCertificate *crt) | 154 purple_certificate_destroy (PurpleCertificate *crt) |
155 { | 155 { |
1895 activ_str = g_strdup(ctime(&activation)); | 1895 activ_str = g_strdup(ctime(&activation)); |
1896 expir_str = g_strdup(ctime(&expiration)); | 1896 expir_str = g_strdup(ctime(&expiration)); |
1897 | 1897 |
1898 /* Make messages */ | 1898 /* Make messages */ |
1899 secondary = g_strdup_printf(_("Common name: %s\n\n" | 1899 secondary = g_strdup_printf(_("Common name: %s\n\n" |
1900 "Fingerprint (SHA1): %s\n\n" | 1900 "Fingerprint (SHA1): %s\n\n" |
1901 "Activation date: %s\n" | 1901 "Activation date: %s\n" |
1902 "Expiration date: %s\n"), | 1902 "Expiration date: %s\n"), |
1903 cn, sha_asc, activ_str, expir_str); | 1903 cn ? cn : "(null)", |
1904 sha_asc ? sha_asc : "(null)", | |
1905 activ_str ? activ_str : "(null)", | |
1906 expir_str ? expir_str : "(null)"); | |
1904 | 1907 |
1905 /* Make a semi-pretty display */ | 1908 /* Make a semi-pretty display */ |
1906 purple_notify_info( | 1909 purple_notify_info( |
1907 NULL, /* TODO: Find what the handle ought to be */ | 1910 NULL, /* TODO: Find what the handle ought to be */ |
1908 _("Certificate Information"), | 1911 _("Certificate Information"), |