From c176117941257156b2da6e094239f5a9a07142fc Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 17 Feb 2012 10:10:15 +0100 Subject: [PATCH] libmm-common: no need to check for end of string when looking for spaces --- libmm-common/mm-common-helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmm-common/mm-common-helpers.c b/libmm-common/mm-common-helpers.c index 422f954d..d0dd83c5 100644 --- a/libmm-common/mm-common-helpers.c +++ b/libmm-common/mm-common-helpers.c @@ -346,7 +346,7 @@ mm_common_parse_key_value_string (const gchar *str, gboolean keep_iteration = FALSE; /* Skip leading spaces */ - while (*p && g_ascii_isspace (*p)) + while (g_ascii_isspace (*p)) p++; /* Key start */ @@ -371,7 +371,7 @@ mm_common_parse_key_value_string (const gchar *str, } /* Skip whitespaces, if any */ - while (*p && g_ascii_isspace (*p)) + while (g_ascii_isspace (*p)) p++; /* Equal sign must be here */ @@ -385,7 +385,7 @@ mm_common_parse_key_value_string (const gchar *str, p++; /* Skip whitespaces, if any */ - while (*p && g_ascii_isspace (*p)) + while (g_ascii_isspace (*p)) p++; /* Do we have a quote-enclosed string? */ @@ -421,7 +421,7 @@ mm_common_parse_key_value_string (const gchar *str, /* Note that we allow value == value_end here */ /* Skip whitespaces, if any */ - while (*p && g_ascii_isspace (*p)) + while (g_ascii_isspace (*p)) p++; /* If a comma is found, we should keep the iteration */