~ubuntu-branches/ubuntu/precise/torque/precise-updates

« back to all changes in this revision

Viewing changes to src/lib/Libifl/list_link.c

  • Committer: Bazaar Package Importer
  • Author(s): Dominique Belhachemi
  • Date: 2010-05-17 20:56:46 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100517205646-yjsoqs5r1s9xpnu9
Tags: upstream-2.4.8+dfsg
ImportĀ upstreamĀ versionĀ 2.4.8+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
void append_link(
192
192
 
193
193
  tlist_head *head, /* ptr to head of list */
194
 
  list_link *new,  /* ptr to new entry */
195
 
  void      *pobj) /* ptr to object to link in */
 
194
  list_link  *new,  /* ptr to new entry */
 
195
  void       *pobj) /* ptr to object to link in */
196
196
 
197
197
  {
198
198
#ifndef NDEBUG
229
229
   * entry appear to be the head, so we never let that happen
230
230
   */
231
231
 
232
 
  if (pobj)
 
232
  if (pobj != NULL)
233
233
    {
234
234
    new->ll_struct = pobj;
235
235
    }
290
290
 * swap_link - swap the positions of members of a list
291
291
 */
292
292
 
293
 
void swap_link(pone, ptwo)
294
 
list_link *pone;
295
 
list_link *ptwo;
 
293
void
 
294
swap_link(list_link *pone, list_link *ptwo)
296
295
  {
297
296
  list_link *p1p;
298
297
  list_link *p2p;
326
325
 *     0 if not in list
327
326
 */
328
327
 
329
 
int is_linked(head, entry)
330
 
list_link *head;
331
 
list_link *entry;
 
328
int
 
329
is_linked(list_link *head, list_link *entry)
332
330
  {
333
331
  list_link *pl;
334
332
 
405
403
 * list_move - move an entire list from one head to another
406
404
 */
407
405
 
408
 
void list_move(from, to)
409
 
tlist_head *from;
410
 
tlist_head *to;
 
406
void
 
407
list_move(tlist_head *from, tlist_head *to)
411
408
  {
412
409
  if (from->ll_next == from)
413
410
    {