Guest User

Untitled

a guest
Jan 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1.    
  2.     /* Link sessions together */
  3.     FreeSessions = &Sessions[permutation[0]];
  4.     LastFreeSession = &Sessions[permutation[NumSessionSlots-1]];
  5.     for (i=0; i<NumSessionSlots-1; i++) {
  6.         Sessions[permutation[i]].next = &Sessions[permutation[i+1]];
  7.     }
  8.     Sessions[permutation[NumSessionSlots-1]].next = NULL;
  9.     free(permutation);
  10.     } else {
  11.     /* Link sessions together */
  12.     FreeSessions = &Sessions[0];
  13.     LastFreeSession = &Sessions[NumSessionSlots - 1];
  14.     for (i=0; i<NumSessionSlots-1; i++) {
  15.         Sessions[i].next = &Sessions[i+1];
  16.     }
  17.     Sessions[NumSessionSlots-1].next = NULL;
  18.     }
Add Comment
Please, Sign In to add comment