[tracker] libtracker-extract: text_len is unsigned, so this check had no point
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-extract: text_len is unsigned, so this check had no point
- Date: Fri, 21 May 2010 14:03:56 +0000 (UTC)
commit feb42f4a0f718704fefc960d7763d509b89466e6
Author: Philip Van Hoof <philip codeminded be>
Date: Fri May 21 16:02:17 2010 +0200
libtracker-extract: text_len is unsigned, so this check had no point
src/libtracker-extract/tracker-utils.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-utils.c b/src/libtracker-extract/tracker-utils.c
index 7f291b3..3971a62 100644
--- a/src/libtracker-extract/tracker-utils.c
+++ b/src/libtracker-extract/tracker-utils.c
@@ -379,18 +379,14 @@ tracker_text_validate_utf8 (const gchar *text,
GString **str,
gsize *valid_len)
{
- gsize len_to_validate;
-
g_return_val_if_fail (text, FALSE);
- len_to_validate = text_len >= 0 ? text_len : strlen (text);
-
- if (len_to_validate > 0) {
+ if (text_len > 0) {
const gchar *end = text;
/* Validate string, getting the pointer to first non-valid character
* (if any) or to the end of the string. */
- g_utf8_validate (text, len_to_validate, &end);
+ g_utf8_validate (text, text_len, &end);
if (end > text) {
/* If str output required... */
if (str) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]