Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What Can This Function Possibly Do?

Name: Anonymous 2011-09-28 5:17

I'm all lost...

libEntity *__cdecl cyLibDataEntry254(libEntity *E, entityPair *P)
{
  libEntity *L; // edx@1
  libEntity *Result; // eax@5
  libEntity *R; // edx@7

  L = E->L;
  if ( L )
  {
    L->R = E->R;
again:
    R = E->R;
    if ( R )
    {
      Result = E->L;
      R->L = Result;
    }
    else
    {
      if ( P->R != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
      Result = E->L;
      P->R = Result;
    }
    E->L = 0;
    E->R = 0;
    return Result;
  }
  if ( P->L == E )
  {
    P->L = E->R;
    goto again;
  }
  if ( E->R )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
  return Result;
}

Name: Anonymous 2011-09-28 20:18

>>43
You are too stupid to notice that

  L = E->L;
  if ( L )
  {
    L->R = E->R;

does list unlinking. But if I name the vars...

  P = E->Prev;
  if ( P )
  {
    P->Next = E->Next;

...now even niggers will understand the code.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List