[network-manager-applet/NETWORKMANAGER_APPLET_0_7] Fix ignored phrase scrubbing
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Subject: [network-manager-applet/NETWORKMANAGER_APPLET_0_7] Fix ignored phrase scrubbing
- Date: Tue, 2 Jun 2009 16:30:45 -0400 (EDT)
commit 101b2e3408d21d285d266567c2045a0d3c001355
Author: Dan Williams <dcbw redhat com>
Date: Tue Jun 2 16:18:04 2009 -0400
Fix ignored phrase scrubbing
---
src/utils/utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/utils/utils.c b/src/utils/utils.c
index 6dfdd0f..c68c2cd 100644
--- a/src/utils/utils.c
+++ b/src/utils/utils.c
@@ -49,6 +49,7 @@ static char *ignored_words[] = {
"Components",
"Corporation",
"Communications",
+ "Company",
"Corp.",
"Corp",
"Co.",
@@ -102,12 +103,11 @@ fixup_desc_string (const char *desc)
/* Attempt to shorten ID by ignoring certain phrases */
for (item = ignored_phrases; *item; item++) {
- guint32 temp_len = strlen (temp);
guint32 ignored_len = strlen (*item);
p = strstr (temp, *item);
if (p)
- memmove (p, p + ignored_len, temp_len - (p - temp));
+ memmove (p, p + ignored_len, strlen (p + ignored_len) + 1); /* +1 for the \0 */
}
/* Attmept to shorten ID by ignoring certain individual words */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]