Lines Matching refs:lp
412 name_list_t *lp, *np, *sp, *rt = NULL; in merge_name_list() local
418 lp = *list; in merge_name_list()
419 while (lp) { in merge_name_list()
420 if (strcmp(lp->name, np->name) == 0) in merge_name_list()
422 lp = lp->next; in merge_name_list()
423 if (lp == *list) in merge_name_list()
424 lp = NULL; in merge_name_list()
430 if (lp) { in merge_name_list()
431 lp->status |= (np->status & FM_SUSPECT_FAULTY); in merge_name_list()
433 lp->pct += np->pct; in merge_name_list()
434 lp->count += np->count; in merge_name_list()
435 } else if (np->pct > lp->pct) { in merge_name_list()
436 lp->pct = np->pct; in merge_name_list()
444 if (max_pct > lp->max_pct) { in merge_name_list()
445 lp->max_pct = max_pct; in merge_name_list()
446 if (lp->max_pct > lp->prev->max_pct && in merge_name_list()
447 lp != *list) { in merge_name_list()
448 lp->prev->next = lp->next; in merge_name_list()
449 lp->next->prev = lp->prev; in merge_name_list()
450 np = lp; in merge_name_list()
455 lp = *list; in merge_name_list()
456 if (lp) { in merge_name_list()
457 if (np->max_pct > lp->max_pct) { in merge_name_list()
458 np->next = lp; in merge_name_list()
459 np->prev = lp->prev; in merge_name_list()
460 lp->prev->next = np; in merge_name_list()
461 lp->prev = np; in merge_name_list()
465 lp = lp->next; in merge_name_list()
466 while (lp != *list && in merge_name_list()
467 np->max_pct < lp->max_pct) { in merge_name_list()
468 lp = lp->next; in merge_name_list()
470 np->next = lp; in merge_name_list()
471 np->prev = lp->prev; in merge_name_list()
472 lp->prev->next = np; in merge_name_list()
473 lp->prev = np; in merge_name_list()