cell *p;
for (p = 先頭セル; *p; p = p->next)
  if (p->id == ID)
    break;

/* Not found... */
if (!p)
  return NULL;

... p に対する処理 ...