[grilo-plugins] youtube: remove c99 code style
- From: Victor Manuel Jaquez Leal <vjaquez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] youtube: remove c99 code style
- Date: Tue, 10 Aug 2010 09:21:44 +0000 (UTC)
commit 145c4905fb35c07b962c67ceee7dfd1f0240384e
Author: VÃctor Manuel Jáquez Leal <vjaquez igalia com>
Date: Mon Aug 9 19:40:36 2010 +0200
youtube: remove c99 code style
This module has variable declarations in a for sentence, which is
only valid for c99, but the dialect is not activated in configure.ac
As the rest of the code don't stick to c99 hence is better just
change these few lines.
Signed-off-by: VÃctor Manuel Jáquez Leal <vjaquez igalia com>
src/youtube/grl-youtube.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index 826a088..d8b78fc 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -656,7 +656,9 @@ get_category_term_from_id (const gchar *category_id)
static gint
get_category_index_from_id (const gchar *category_id)
{
- for (gint i=0; i<root_dir[ROOT_DIR_CATEGORIES_INDEX].count; i++) {
+ gint i;
+
+ for (i=0; i<root_dir[ROOT_DIR_CATEGORIES_INDEX].count; i++) {
if (!strcmp (categories_dir[i].id, category_id)) {
return i;
}
@@ -693,9 +695,11 @@ item_count_cb (GObject *object, GAsyncResult *result, CategoryCountCb *cc)
static void
compute_category_counts (GDataService *service)
{
+ gint i;
+
g_debug ("compute_category_counts");
- for (gint i=0; i<root_dir[ROOT_DIR_CATEGORIES_INDEX].count; i++) {
+ for (i=0; i<root_dir[ROOT_DIR_CATEGORIES_INDEX].count; i++) {
g_debug ("Computing chilcount for category '%s'", categories_dir[i].id);
GDataQuery *query = gdata_query_new_with_limits (NULL, 0, 1);
const gchar *category_term =
@@ -716,9 +720,10 @@ compute_category_counts (GDataService *service)
static void
compute_feed_counts (GDataService *service)
{
+ gint i;
g_debug ("compute_feed_counts");
- for (gint i=0; i<root_dir[ROOT_DIR_FEEDS_INDEX].count; i++) {
+ for (i=0; i<root_dir[ROOT_DIR_FEEDS_INDEX].count; i++) {
g_debug ("Computing chilcount for feed '%s'", feeds_dir[i].id);
gint feed_type = get_feed_type_from_id (feeds_dir[i].id);
GDataQuery *query = gdata_query_new_with_limits (NULL, 0, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]