- Timestamp:
- 2010-03-18T11:22:17Z (15 years ago)
- Branches:
- master
- Children:
- 638feab
- Parents:
- 00a0bc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber_util.c
r00a0bc5 r842cd8d 4 4 * Jabber module - Misc. stuff * 5 5 * * 6 * Copyright 2006 Wilmer van der Gaast <wilmer@gaast.net> *6 * Copyright 2006-2010 Wilmer van der Gaast <wilmer@gaast.net> 7 7 * * 8 8 * This program is free software; you can redistribute it and/or modify * … … 556 556 { 557 557 struct jabber_data *jd = ic->proto_data; 558 struct jabber_buddy *bud, *prev , *bi;558 struct jabber_buddy *bud, *prev = NULL, *bi; 559 559 char *s, *full_jid; 560 560 … … 567 567 { 568 568 if( bud->next ) 569 bud = bud->next;569 bud = (prev=bud)->next; 570 570 571 571 /* If there's only one item in the list (and if the resource … … 587 587 else 588 588 { 589 for( bi = bud , prev = NULL; bi; bi = (prev=bi)->next )589 for( bi = bud; bi; bi = (prev=bi)->next ) 590 590 if( strcmp( bi->resource, s + 1 ) == 0 ) 591 591 break; … … 598 598 prev->next = bi->next; 599 599 else 600 /* The hash table should point at the second 601 item, because we're removing the first. */ 600 /* Don't think this should ever happen anymore. */ 602 601 g_hash_table_replace( jd->buddies, bi->bare_jid, bi->next ); 603 602
Note: See TracChangeset
for help on using the changeset viewer.