~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to libltdl/slist.c

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* slist.c -- generalised singly linked lists
2
2
 
3
 
   Copyright (C) 2000, 2004, 2007, 2008 Free Software Foundation, Inc.
 
3
   Copyright (C) 2000, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
4
4
   Written by Gary V. Vaughan, 2000
5
5
 
6
6
   NOTE: The canonical source of this file is maintained with the
32
32
 
33
33
#include "slist.h"
34
34
#include <stddef.h>
 
35
#include <stdlib.h>
35
36
 
36
37
static SList *  slist_sort_merge    (SList *left, SList *right,
37
38
                                     SListCompare *compare, void *userdata);
73
74
           the stale item, you should probably return that from FIND if
74
75
           it makes a successful match.  Don't forget to slist_unbox()
75
76
           every item in a boxed list before operating on its contents.   */
76
 
void *
 
77
SList *
77
78
slist_remove (SList **phead, SListCallback *find, void *matchdata)
78
79
{
79
80
  SList *stale = 0;
107
108
        }
108
109
    }
109
110
 
110
 
  return result;
 
111
  return (SList *) result;
111
112
}
112
113
 
113
114
/* Call FIND repeatedly with each element of SLIST and MATCHDATA, until
314
315
  left = slist;
315
316
  right = slist->next;
316
317
 
 
318
  if (!right)
 
319
    return left;
 
320
 
317
321
  /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off
318
322
     the end.  SLIST must be about half way along.  */
319
323
  while (right && (right = right->next))