[telepathy-mission-control/master] McdConnection: make static string arrays (as well as the contents) const
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Jul 9 06:08:01 PDT 2009
This would have made the compiler refuse to let us get away with
implementing the bug fixed in the previous commit.
---
src/mcd-connection.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index bac6e70..2057330 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -159,12 +159,12 @@ enum
static guint signals[N_SIGNALS] = { 0 };
-static const gchar *_available_fb[] = { NULL };
-static const gchar *_away_fb[] = { "away", NULL };
-static const gchar *_ext_away_fb[] = { "xa", "away", NULL };
-static const gchar *_hidden_fb[] = { "hidden", "dnd", "busy", "away", NULL };
-static const gchar *_busy_fb[] = { "busy", "dnd", "away", NULL };
-static const gchar **presence_fallbacks[] = {
+static const gchar * const _available_fb[] = { NULL };
+static const gchar * const _away_fb[] = { "away", NULL };
+static const gchar * const _ext_away_fb[] = { "xa", "away", NULL };
+static const gchar * const _hidden_fb[] = { "hidden", "dnd", "busy", "away", NULL };
+static const gchar * const _busy_fb[] = { "busy", "dnd", "away", NULL };
+static const gchar * const *presence_fallbacks[] = {
_available_fb, _away_fb, _ext_away_fb, _hidden_fb, _busy_fb
};
@@ -197,7 +197,7 @@ static gboolean
_check_presence (McdConnectionPrivate *priv, TpConnectionPresenceType presence,
const gchar **status)
{
- const gchar **fallbacks;
+ const gchar * const *fallbacks;
if (priv->recognized_presences == NULL ||
g_hash_table_size (priv->recognized_presences) == 0)
--
1.5.6.5
More information about the telepathy-commits
mailing list