Mercurial > pidgin
comparison finch/libgnt/gntentry.c @ 30430:351d07aefb09
Kill off many dead assignments and any useless remaining variables.
I think some of those QQ ones were actual logic errors, too.
Let me know if there were any side-effects that were cut.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 23 Aug 2010 00:52:24 +0000 |
parents | 7c871249318b |
children | a8cc50c2279f |
comparison
equal
deleted
inserted
replaced
30429:922c8c553758 | 30430:351d07aefb09 |
---|---|
479 history_search(GntBindable *bind, GList *null) | 479 history_search(GntBindable *bind, GList *null) |
480 { | 480 { |
481 GntEntry *entry = GNT_ENTRY(bind); | 481 GntEntry *entry = GNT_ENTRY(bind); |
482 GList *iter; | 482 GList *iter; |
483 const char *current; | 483 const char *current; |
484 int len; | |
485 | 484 |
486 if (entry->history->prev && entry->search->needle) | 485 if (entry->history->prev && entry->search->needle) |
487 current = entry->search->needle; | 486 current = entry->search->needle; |
488 else | 487 else |
489 current = gnt_entry_get_text(entry); | 488 current = gnt_entry_get_text(entry); |
490 | 489 |
491 if (!entry->histlength || !entry->history->next || !*current) | 490 if (!entry->histlength || !entry->history->next || !*current) |
492 return FALSE; | 491 return FALSE; |
493 | |
494 len = g_utf8_strlen(current, -1); | |
495 | 492 |
496 for (iter = entry->history->next; iter; iter = iter->next) { | 493 for (iter = entry->history->next; iter; iter = iter->next) { |
497 const char *str = iter->data; | 494 const char *str = iter->data; |
498 /* A more utf8-friendly version of strstr would have been better, but | 495 /* A more utf8-friendly version of strstr would have been better, but |
499 * for now, this will have to do. */ | 496 * for now, this will have to do. */ |